nixpkgs/test/boot-stage-2-init.sh
Eelco Dolstra db08678bd4 * Create dummy mount points in the ISO image for /proc etc.
svn path=/nixu/trunk/; revision=6946
2006-11-04 00:18:22 +00:00

32 lines
563 B
Bash

#! @shell@
# !!! copied from stage 1; remove duplication
# Print a greeting.
echo
echo "<<< NixOS Stage 2 >>>"
echo
# Set the PATH.
export PATH=/empty
for i in @path@; do
PATH=$PATH:$i/bin
if test -e $i/sbin; then
PATH=$PATH:$i/sbin
fi
done
# Mount special file systems.
mount -t tmpfs none /etc -n # to shut up mount
touch /etc/fstab # idem
mount -t proc none /proc
mount -t sysfs none /sys
mount -t tmpfs none /dev
mount -t tmpfs none /tmp
# Create device nodes in /dev.
source @makeDevices@
# Start an interactive shell.
exec @shell@