|
|
@ -27,24 +27,20 @@ |
|
|
|
# |
|
|
|
|
|
|
|
main_begin |
|
|
|
block_begin(start, `Mounting /dev, /proc and /dev/shm.') |
|
|
|
block_begin(start, `Mounting /dev, /proc, /sys and /dev/shm.') |
|
|
|
check(`[ -e /dev/.devfsd ] || mount -n /dev') |
|
|
|
check(`mount -n /proc') |
|
|
|
check(`grep -q sysfs /proc/filesystems && mount -n /sys') |
|
|
|
check(`mount -n /dev/shm') |
|
|
|
mount -n /dev/pts 2> /dev/null |
|
|
|
dnl |
|
|
|
if [ -f /etc/conf/hardware ]; then |
|
|
|
if [ -f /etc/conf/hardware ] ; then |
|
|
|
. /etc/conf/hardware |
|
|
|
fi |
|
|
|
|
|
|
|
dnl |
|
|
|
block_split(`Configuring the /dev filesystem ...') |
|
|
|
check(`sh /etc/conf/devfs') |
|
|
|
|
|
|
|
if [ -f /etc/raidtab ]; then |
|
|
|
block_split(`Starting softraid systems ...') |
|
|
|
check(`/sbin/raidstart --all') |
|
|
|
fi |
|
|
|
|
|
|
|
dnl |
|
|
|
block_split(`Activating swap devices.') |
|
|
|
check(`swapon -a') |
|
|
|
dnl |
|
|
@ -77,7 +73,7 @@ dnl |
|
|
|
rootdev="/dev/$(ls -l /dev/root | sed 's,.* -> ,,')" |
|
|
|
check(`grep -v "^rootfs " /proc/mounts | \ |
|
|
|
sed "s,^/dev/root ,$rootdev ," > /etc/mtab') |
|
|
|
check(`mount -a -t nocoda,nfs') |
|
|
|
check(`mount -a -t nocoda,nfs,devfs,proc,sysfs') |
|
|
|
dnl |
|
|
|
if [ "$HARDWARE_SETUP" = rockplug ]; then |
|
|
|
block_split(`Configuring hardware by activating rockplug.') |
|
|
@ -192,6 +188,7 @@ dnl |
|
|
|
[ "$dir" = "/dev" ] && continue |
|
|
|
[ "$dir" = "/dev/shm" ] && continue |
|
|
|
[ "$dir" = "/proc" ] && continue |
|
|
|
[ "$dir" = "/sys" ] && continue |
|
|
|
[ "$dir" = "/tmp" ] && continue |
|
|
|
echo "Umounting $dev on $dir ($fs)." |
|
|
|
mount -o remount,sync $dir |
|
|
@ -202,7 +199,7 @@ dnl |
|
|
|
block_split(`Unmounting remaining file systems.') |
|
|
|
grep -E -v '^none (/|[a-z]+:) ' /proc/mounts > /etc/mtab |
|
|
|
sync ; sleep 1 ; sync |
|
|
|
umount -vnra -t noproc,devfs,shm |
|
|
|
umount -vnra -t nodevfs,proc,sysfs,shm |
|
|
|
mount -vn -o remount,sync / |
|
|
|
mount -vn -o remount,ro / |
|
|
|
sleep 1 ; sync ; sleep 1 |
|
|
|