mount -v -n /dev
mount -v -n /proc ; mount -v -n /sys
+mkdir -p /dev/shm ; mount -v -n /dev/shm
+mkdir -p /dev/pts ; mount -v -n /dev/pts
echo "loading kernel modules and configuring the kernel ..."
. /etc/conf/kernel
echo "shutting down udev ..."
/etc/init.d/udev stop
- umount /dev/pts
- umount /dev/shm
+ umount /dev/pts ; rm -rf /dev/pts
+ umount /dev/shm ; rm -rf /dev/shm
umount /dev
echo "unmounting remaining file systems ..."
PATH=/bin:/sbin:/usr/bin:/usr/sbin
export PATH
-# Make sure we have a /dev/console
-#
-if ! [ -e /dev/.devfsd ] ; then
- mount -v -n -t devfs none /dev
- echo "Mounted /dev (devfs) from /etc/initscript." > /dev/console
-fi
-
# Execute the program.
#
eval exec "$4" > /dev/console 2>&1 < /dev/console
# all other devices
for i in ${sysfs_dir}/class/*; do
for j in $i/*; do
+ # cruel hack, to not add/del /dev/null
+ if [ "$j" != "${sysfs_dir}/class/mem/null" ] ; then
if [ -f $j/dev ]; then
export DEVPATH=${j#${sysfs_dir}}
CLASS=`echo ${i#${sysfs_dir}} | \
cut --delimiter='/' --fields=3-`
$bin $CLASS &
fi
+ fi
done
done
return 0
ln -snf /proc/self/fd/1 $udev_root/stdout
ln -snf /proc/self/fd/2 $udev_root/stderr
ln -snf /proc/kcore $udev_root/core
- mkdir $udev_root/pts
- mount $udev_root/pts
- mkdir $udev_root/shm
- mount $udev_root/shm
}
# delete them when shutting down (not used right now)
del_nodes() {
- umount $udev_root/shm
- umount $udev_root/pts
- rm -rf $udev_root/{fd,stdin,stdout,stderr,core,pts,shm}
+ rm -rf $udev_root/{fd,stdin,stdout,stderr,core}
}
# main procedures
exit 1
fi
rm -f $udev_root/.udev.tdb
+ mknod -m 0666 ${udev_root}/null c 1 3
export ACTION=add
export UDEV_NO_SLEEP=1
run_udev
export ACTION=remove
run_udev
del_nodes
+ rm ${udev_root}/null
echo " done"
;;
restart)