#! @shell@ set -e export PATH=/empty for i in @path@; do PATH=$PATH:$i/bin:$i/sbin; done action="$1" if ! test -e /etc/NIXOS; then echo "This is not a NixOS installation (/etc/NIXOS) is missing!" exit 1 fi if test -z "$action"; then cat < /boot/grub/version fi else echo "Warning: don't know how to make this configuration bootable; please set \`boot.grubDevice'." 1>&2 fi elif [ "@bootLoader@" = "generationsDir" ]; then @menuBuilder@ @out@ else echo "Warning: don't know how to make this configuration bootable; please enable a boot loader." 1>&2 fi if [ -n "@initScriptBuilder@" ]; then @initScriptBuilder@ @out@ fi fi # Activate the new configuration. if [ "$action" = "switch" -o "$action" = "test" ]; then oldVersion=$(cat /var/run/current-system/upstart-interface-version 2> /dev/null || echo 0) newVersion=$(cat @out@/upstart-interface-version 2> /dev/null || echo 0) if test "$oldVersion" -ne "$newVersion"; then cat <