slitaz-boot-scripts rev 304
Faster system clean up
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Fri Jun 01 22:35:36 2012 +0200 (2012-06-01) |
parents | 445b09ea0b07 |
children | 38802b3f2923 |
files | etc/init.d/rcS |
line diff
1.1 --- a/etc/init.d/rcS Fri Jun 01 22:00:52 2012 +0200 1.2 +++ b/etc/init.d/rcS Fri Jun 01 22:35:36 2012 +0200 1.3 @@ -53,7 +53,6 @@ 1.4 mount -t devtmpfs devtmpfs /dev 1.5 status 1.6 echo "Starting udev daemon..." 1.7 - mkdir -p /run/udev 1.8 udevd --daemon 2>/dev/null 1.9 echo "Udevadm requesting events from the Kernel..." 1.10 udevadm trigger 1.11 @@ -82,8 +81,6 @@ 1.12 for opt in $(cat /proc/cmdline) 1.13 do 1.14 case $opt in 1.15 - cdrom=*) 1.16 - export CDROM=${opt#cdrom=} ;; 1.17 modprobe=*) 1.18 export MODPROBE="yes" ;; 1.19 config=*) 1.20 @@ -94,12 +91,13 @@ 1.21 done 1.22 status 1.23 1.24 -# Clean up the system and set up tmp X11 and ICE dir 1.25 +# Clean up the system and set up tmp dirs. Since we mount /run as tmpfs 1.26 +# and have a symlink for /var/run we should have empty directories. But, 1.27 +# some packages may overwrite the link, so make sure we have it. 1.28 if [ "$CLEAN_UP_SYSTEM" = "yes" ]; then 1.29 echo -n "Cleaning up the system..." 1.30 - find /var/run -name "*.pid" -type f | xargs /bin/rm -f 1.31 - rm -rf /tmp /var/run/dbus/* /var/run/hald/pid /var/lock/* 1.32 - mkdir -p /tmp/.X11-unix /tmp/.ICE-unix 1.33 + rm -rf /tmp /var/run && ln -s /run /var/run 1.34 + mkdir -p /tmp/.X11-unix /tmp/.ICE-unix /run/dbus 1.35 chmod -R 1777 /tmp 1.36 status 1.37 else