2006-11-12 23:30:03 +00:00
|
|
|
source $stdenv/setup
|
|
|
|
|
|
|
|
ensureDir $out
|
|
|
|
|
|
|
|
ln -s $kernel $out/kernel
|
|
|
|
ln -s $grub $out/grub
|
|
|
|
|
|
|
|
cat > $out/menu.lst << GRUBEND
|
2006-11-24 00:04:29 +00:00
|
|
|
kernel $kernel selinux=0 apm=on acpi=on init=$bootStage2
|
|
|
|
initrd $initrd
|
2006-11-12 23:30:03 +00: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-23 23:22:43 +00:00
|
|
|
$grubMenuBuilder $out
|
2006-11-12 23:30:03 +00:00
|
|
|
$grub/sbin/grub-install "$grubDevice" --no-floppy --recheck
|
|
|
|
fi
|
|
|
|
EOF
|
|
|
|
|
|
|
|
chmod +x $out/bin/switch-to-configuration
|