slitaz-boot-scripts rev 171
Mount /proc first to parse /proc/cmdline... (rcS tiny clean)
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Mon Apr 27 23:20:13 2009 +0200 (2009-04-27) |
parents | 31cdb3990493 |
children | 0eba58974c18 |
files | etc/init.d/bootopts.sh etc/init.d/rcS |
line diff
1.1 --- a/etc/init.d/bootopts.sh Mon Apr 27 15:57:21 2009 +0200 1.2 +++ b/etc/init.d/bootopts.sh Mon Apr 27 23:20:13 2009 +0200 1.3 @@ -139,7 +139,9 @@ 1.4 for mod in ac battery fan yenta_socket 1.5 do 1.6 modprobe $mod 1.7 - done ;; 1.8 + done 1.9 + # Enable Kernel Laptop mode. 1.10 + echo "5" > /proc/sys/vm/laptop_mode ;; 1.11 mount) 1.12 # Mount all ext3 partitions found (opt: mount). 1.13 # Get the list of partitions.
2.1 --- a/etc/init.d/rcS Mon Apr 27 15:57:21 2009 +0200 2.2 +++ b/etc/init.d/rcS Mon Apr 27 23:20:13 2009 +0200 2.3 @@ -8,8 +8,18 @@ 2.4 . /etc/init.d/rc.functions 2.5 . /etc/rcS.conf 2.6 2.7 +if [ "$1" != "logged" ]; then # logged 2.8 + 2.9 +echo "Processing /etc/init.d/rcS..." 2.10 + 2.11 +# Mount /proc. 2.12 +echo -n "Mounting proc filesystem..." 2.13 +/bin/mount proc 2.14 +status 2.15 + 2.16 # Parse cmdline args for earlier boot options. All other boot options 2.17 # are in /etc/init./bootopts.sh. 2.18 +echo -n "Searching for early boot options..." 2.19 for opt in `cat /proc/cmdline` 2.20 do 2.21 case $opt in 2.22 @@ -25,14 +35,6 @@ 2.23 continue ;; 2.24 esac 2.25 done 2.26 - 2.27 -if [ "$1" != "logged" ]; then # logged 2.28 - 2.29 -echo "Processing /etc/init.d/rcS... " 2.30 - 2.31 -# Mount /proc. 2.32 -echo -n "Mounting proc filesystem... " 2.33 -/bin/mount proc 2.34 status 2.35 2.36 # Start Udev to populate /dev and handle hotplug events 2.37 @@ -61,11 +63,11 @@ 2.38 fi 2.39 2.40 # Remount rootfs rw. 2.41 -echo "Remounting rootfs read/write... " 2.42 +echo "Remounting rootfs read/write..." 2.43 /bin/mount -o remount,rw / 2.44 2.45 # Mount filesystems in /etc/fstab. 2.46 -echo "Mounting filesystems in fstab... " 2.47 +echo "Mounting filesystems in fstab..." 2.48 /bin/mount -a 2.49 2.50 # Store boot messages to log files. 2.51 @@ -77,19 +79,19 @@ 2.52 2.53 # Clean up the system. 2.54 if [ "$CLEAN_UP_SYSTEM" = "yes" ]; then 2.55 - echo -n "Cleaning up the system... " 2.56 + echo -n "Cleaning up the system..." 2.57 /bin/rm -rf /tmp /var/run/*.pid /var/run/dbus/* \ 2.58 /var/run/hald/pid /var/lock/* 2.59 /bin/mkdir -p /tmp && /bin/chmod 1777 /tmp 2.60 status 2.61 else 2.62 - echo "System clean up is disabled in /etc/rcS.conf... " 2.63 - echo -n "Keeping all tmp and pid files... " 2.64 + echo "System clean up is disabled in /etc/rcS.conf..." 2.65 + echo -n "Keeping all tmp and pid files..." 2.66 status 2.67 fi 2.68 2.69 # Set up tmp X11 and ICE dir. 2.70 -echo -n "Setting up tmp X11 and ICE unix dir... " 2.71 +echo -n "Setting up tmp X11 and ICE unix dir..." 2.72 /bin/mkdir -p /tmp/.X11-unix /tmp/.ICE-unix 2.73 /bin/chmod 1777 /tmp/.X11-unix /tmp/.ICE-unix 2.74 status 2.75 @@ -161,7 +163,7 @@ 2.76 CONFIG="" 2.77 fi 2.78 fi 2.79 - echo -n "Source $SCRIPT from $DEVICE... " 2.80 + echo -n "Source $SCRIPT from $DEVICE..." 2.81 if [ -n "$CONFIG" ]; then 2.82 . /mnt/$SCRIPT 2.83 /bin/umount /mnt 2.84 @@ -171,19 +173,19 @@ 2.85 2.86 # Mount /proc/bus/usb. 2.87 if [ -d /proc/bus/usb ]; then 2.88 - echo -n "Mounting /proc/bus/usb filesystem... " 2.89 + echo -n "Mounting /proc/bus/usb filesystem..." 2.90 /bin/mount -t usbfs usbfs /proc/bus/usb 2.91 status 2.92 fi 2.93 2.94 # Start syslogd and klogd. 2.95 if [ "$KERNEL_LOG_DAEMONS" = "yes" ]; then 2.96 - echo -n "Starting system log deamon: syslogd... " 2.97 + echo -n "Starting system log deamon: syslogd..." 2.98 /sbin/syslogd -s $SYSLOGD_ROTATED_SIZE && status 2.99 - echo -n "Starting kernel log daemon: klogd... " 2.100 + echo -n "Starting kernel log daemon: klogd..." 2.101 /sbin/klogd && status 2.102 else 2.103 - echo "Kernel log daemons are disabled in /etc/rc.conf... " 2.104 + echo "Kernel log daemons are disabled in /etc/rc.conf..." 2.105 fi 2.106 2.107 # Load all modules listed in config file.