#! @bash@/bin/sh -e shopt -s nullglob export PATH=/empty for i in @path@; do PATH=$PATH:$i/bin; done default=$1 if test -z "$1"; then echo "Syntax: grub-menu-builder.sh " exit 1 fi bootMount="@bootMount@" if test -z "$bootMount"; then bootMount=/boot; fi target=/boot/grub/menu.lst tmp=$target.tmp cat > $tmp << GRUBEND # Automatically generated. DO NOT EDIT THIS FILE! default 0 timeout 5 GRUBEND if test -n "@grubSplashImage@"; then splashLocation=@grubSplashImage@ # !!! image in /nix/store doesn't seem to work #if test -n "@copyKernels@"; then cp -f $splashLocation /boot/background.xpm.gz splashLocation="$bootMount/background.xpm.gz" #fi echo "splashimage $splashLocation" >> $tmp fi configurationCounter=0 configurationLimit="@configurationLimit@" numAlienEntries=$(cat < /boot/nixos-grub-config <> $tmp << GRUBEND title $name kernel $kernel systemConfig=$(readlink -f $path) init=$(readlink -f $path/init) $(cat $path/kernel-params) initrd $initrd GRUBEND } rm -rf /boot/kernels if test -n "@copyKernels@"; then mkdir -p /boot/kernels fi # Additional entries specified verbatim by the configuration. extraGrubEntries=$(cat >> $tmp <