]> hackdaworld.org Git - hdw-linux/hdw-linux.git/commitdiff
more init fixes
authorhackbard <hackbard>
Wed, 28 Jul 2004 21:34:01 +0000 (21:34 +0000)
committerhackbard <hackbard>
Wed, 28 Jul 2004 21:34:01 +0000 (21:34 +0000)
misc/sysfiles/etc/init.d/boot
misc/sysfiles/etc/init.d/down
misc/sysfiles/etc/initscript
packages/base/00-init-conf/00-init-conf
packages/base/udev/init_udev.sh

index 9e1a3be2d90ffca47c648913678eb306bc76dd8f..7352c7e3d08ece3e2b627f3e84396881dc493924 100755 (executable)
@@ -18,6 +18,8 @@ if [ $FORCEFSCK = 1 ] ; then echo "going to force fsck" ; FASTBOOT=0 ; fi
 
 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
index bca54fcea5084471732f973554decb8a4b827ee4..a93bca07fd82b1ae8ef4a5282664d10f83ff5d04 100755 (executable)
@@ -69,8 +69,8 @@ else
 
        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 ..."
index aaffd25cb41798351a05d8cc5fb07857e3cbbef0..39cbdcfde02325fc1b7069828d2f7dc0d9abd520 100755 (executable)
@@ -8,13 +8,6 @@ ulimit -c 2097151
 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
index 7e27a4509cc3d4371f2dce145aff43a0dce37f97..0e1659319274880d24aefda0ddf9e1181b2f5574 100644 (file)
@@ -22,6 +22,7 @@ custmain()    {
                ln -vfs ../$i $root/etc/init.d/rc2.d/K`echo $counter2`$i
                done
                # symbolic link to sbin
+               rm -f $root/sbin/init.d
                ln -svf ../etc/init.d $root/sbin/init.d
        else
                # create minit files
index 75280856334103708a0ef9a0aaf41866d66e12c2..25fdf0f99e62b6f105c94db643f497d99cf8a3f5 100644 (file)
@@ -29,12 +29,15 @@ run_udev()  {
        # 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
@@ -46,17 +49,11 @@ add_nodes() {
        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
@@ -71,6 +68,7 @@ in
                        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
@@ -83,6 +81,7 @@ in
                export ACTION=remove
                run_udev
                del_nodes
+               rm ${udev_root}/null
                echo " done"
                ;;
        restart)