summary refs log tree commit diff
path: root/test/system-configuration.sh
blob: 11254a24d0a9ae33764cda172c41c11cdc94be16 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
source $stdenv/setup

ensureDir $out

ln -s $kernel $out/kernel
ln -s $grub $out/grub

cat > $out/menu.lst << GRUBEND
kernel $kernel selinux=0 apm=on acpi=on init=$bootStage2 $extraKernelParams
initrd $initrd
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
    mkdir -m 0700 -p /boot/grub
    $grubMenuBuilder $out
    $grub/sbin/grub-install "$grubDevice" --no-floppy --recheck
fi
EOF

chmod +x $out/bin/switch-to-configuration