2006-11-13 00:30:03 +01:00
|
|
|
source $stdenv/setup
|
|
|
|
|
|
|
|
ensureDir $out
|
|
|
|
|
|
|
|
ln -s $kernel $out/kernel
|
|
|
|
ln -s $grub $out/grub
|
|
|
|
|
|
|
|
cat > $out/menu.lst << GRUBEND
|
2006-11-26 23:57:35 +01:00
|
|
|
kernel $kernel selinux=0 apm=on acpi=on init=$bootStage2 $extraKernelParams
|
2006-11-24 01:04:29 +01:00
|
|
|
initrd $initrd
|
2006-11-13 00:30:03 +01:00
|
|
|
GRUBEND
|
|
|
|
|
|
|
|
ensureDir $out/bin
|
|
|
|
|
|
|
|
cat > $out/bin/switch-to-configuration <<EOF
|
|
|
|
#! $SHELL
|
|
|
|
set -e
|
|
|
|
export PATH=$coreutils/bin:$gnused/bin:$gnugrep/bin:$diffutils/bin
|
|
|
|
if test -n "$grubDevice"; then
|
2006-11-24 16:31:28 +01:00
|
|
|
mkdir -m 0700 -p /boot/grub
|
2006-11-24 00:22:43 +01:00
|
|
|
$grubMenuBuilder $out
|
2006-11-27 14:51:08 +01:00
|
|
|
if test "\$NIXOS_INSTALL_GRUB" = 1; then
|
|
|
|
$grub/sbin/grub-install "$grubDevice" --no-floppy --recheck
|
|
|
|
fi
|
2006-11-13 00:30:03 +01:00
|
|
|
fi
|
|
|
|
EOF
|
|
|
|
|
|
|
|
chmod +x $out/bin/switch-to-configuration
|