2006-11-04 01:01:13 +01:00
|
|
|
#! @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.
|
2006-11-04 01:18:22 +01:00
|
|
|
mount -t tmpfs none /etc -n # to shut up mount
|
2006-11-04 01:01:13 +01:00
|
|
|
touch /etc/fstab # idem
|
2006-11-04 01:18:22 +01:00
|
|
|
mount -t proc none /proc
|
|
|
|
mount -t sysfs none /sys
|
|
|
|
mount -t tmpfs none /dev
|
|
|
|
mount -t tmpfs none /tmp
|
2006-11-04 01:01:13 +01:00
|
|
|
|
|
|
|
# Create device nodes in /dev.
|
|
|
|
source @makeDevices@
|
|
|
|
|
2006-11-04 14:25:10 +01:00
|
|
|
# Ensure that the module tools can find the kernel modules.
|
|
|
|
export MODULE_DIR=@kernel@/lib/modules/
|
|
|
|
|
|
|
|
# Additional path for the interactive shell.
|
|
|
|
for i in @extraPath@; do
|
|
|
|
PATH=$PATH:$i/bin
|
|
|
|
if test -e $i/sbin; then
|
|
|
|
PATH=$PATH:$i/sbin
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
2006-11-04 01:01:13 +01:00
|
|
|
# Start an interactive shell.
|
|
|
|
exec @shell@
|