slitaz-boot-scripts diff etc/init.d/rcS @ rev 393
network.sh: better handle WEP connections, handle EAP, store Wi-Fi neworks by default; network.conf: migrate to extended format to support EAP arguments, and few more.
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Mon Mar 23 02:01:21 2015 +0200 (2015-03-23) |
parents | f0e04a0ba4d5 |
children | 7acd64a8f538 |
line diff
1.1 --- a/etc/init.d/rcS Sat Jan 10 13:35:51 2015 +0100 1.2 +++ b/etc/init.d/rcS Mon Mar 23 02:01:21 2015 +0200 1.3 @@ -17,28 +17,31 @@ 1.4 1.5 readonly) 1.6 1.7 -colorize 34 "Processing: /etc/init.d/rcS..." 1.8 +colorize 34 'Processing: /etc/init.d/rcS...' 1.9 1.10 # Mount /proc 1.11 -echo -n "Mounting proc filesystem on /proc" 1.12 +echo -n 'Mounting proc filesystem on /proc' 1.13 mount proc && status 1.14 1.15 # Trigger Udev and handle hotplug events 1.16 if [ "$UDEV" == "yes" ]; then 1.17 - echo -n "Mounting devtmpfs filesystem on: /dev" 1.18 + echo -n 'Mounting devtmpfs filesystem on: /dev' 1.19 mount -t devtmpfs devtmpfs /dev 1.20 status 1.21 - echo "Starting udev daemon..." 1.22 + 1.23 + echo 'Starting udev daemon...' 1.24 udevd --daemon 2>/dev/null 1.25 - echo "Udevadm requesting events from the Kernel..." 1.26 + 1.27 + echo 'Udevadm requesting events from the Kernel...' 1.28 udevadm trigger 1.29 - echo "Udevadm waiting for the event queue to finish..." 1.30 + 1.31 + echo 'Udevadm waiting for the event queue to finish...' 1.32 udevadm settle --timeout=120 1.33 # Disable hotplug helper since udevd listen to netlink 1.34 - echo "" > /proc/sys/kernel/hotplug 1.35 + echo '' > /proc/sys/kernel/hotplug 1.36 else 1.37 - echo -n "Executing mdev -s to populate /dev..." 1.38 - mdev -s && echo "mdev" > /proc/sys/kernel/hotplug 1.39 + echo -n 'Executing mdev -s to populate /dev...' 1.40 + mdev -s && echo 'mdev' > /proc/sys/kernel/hotplug 1.41 status 1.42 fi 1.43 1.44 @@ -54,31 +57,31 @@ 1.45 fi 1.46 1.47 # Remount rootfs rw. 1.48 -echo "Remounting rootfs read/write..." 1.49 +echo 'Remounting rootfs read/write...' 1.50 mount -o remount,rw / 1.51 sync # ensure rw state 1.52 1.53 # Mount filesystems in /etc/fstab. 1.54 -echo "Mounting filesystems in fstab..." 1.55 +echo 'Mounting filesystems in fstab...' 1.56 mount -a 1.57 ;; 1.58 1.59 + 1.60 readwrite) 1.61 1.62 # Be quiet 1.63 -echo "0 0 0 0" > /proc/sys/kernel/printk 1.64 +echo '0 0 0 0' > /proc/sys/kernel/printk 1.65 1.66 # Store boot messages to log files. 1.67 dmesg > /var/log/dmesg.log & 1.68 1.69 # Parse cmdline args for earlier boot options. All other boot options 1.70 # are in /etc/init./bootopts.sh. 1.71 -echo -n "Searching for early boot options..." 1.72 -for opt in $(cat /proc/cmdline) 1.73 -do 1.74 +echo -n 'Searching for early boot options...' 1.75 +for opt in $(cat /proc/cmdline); do 1.76 case $opt in 1.77 modprobe=*) 1.78 - export MODPROBE="yes" ;; 1.79 + export MODPROBE='yes' ;; 1.80 config=*) 1.81 export CONFIG=${opt#config=} ;; 1.82 screen=*) 1.83 @@ -91,14 +94,14 @@ 1.84 1.85 # Clean up the system and set up tmp dirs. */run/* are tmpfs so they are 1.86 # cleaned up at shutdown. 1.87 -if [ "$CLEAN_UP_SYSTEM" = "yes" ]; then 1.88 - echo -n "Cleaning up the system..." 1.89 +if [ "$CLEAN_UP_SYSTEM" == 'yes' ]; then 1.90 + echo -n 'Cleaning up the system...' 1.91 rm -rf /tmp 1.92 mkdir -p /tmp/.X11-unix /tmp/.ICE-unix 1.93 chmod -R 1777 /tmp 1.94 status 1.95 else 1.96 - echo "System clean up is disabled in: /etc/rcS.conf" 1.97 + echo 'System clean up is disabled in: /etc/rcS.conf' 1.98 fi 1.99 1.100 # Handle kernel cmdline parameter modprobe=<module_list> 1.101 @@ -118,7 +121,7 @@ 1.102 SCRIPT=${CONFIG#*,} 1.103 echo "Probing $DEVICE... " 1.104 if ! mount -r $DEVICE /mnt; then 1.105 - if echo $DEVICE | grep -Eq "/dev/sd|UUID=|LABEL="; then 1.106 + if echo $DEVICE | grep -Eq '/dev/sd|UUID=|LABEL='; then 1.107 USBDELAY=$(cat /sys/module/usb_storage/parameters/delay_use) 1.108 USBDELAY=$((1+$USBDELAY)) 1.109 echo "$DEVICE is potentially a USB device: sleep for $USBDELAY seconds" 1.110 @@ -138,20 +141,20 @@ 1.111 1.112 # Mount /proc/bus/usb 1.113 if [ -d /proc/bus/usb ]; then 1.114 - echo -n "Mounting usbfs filesystem on: /proc/bus/usb" 1.115 + echo -n 'Mounting usbfs filesystem on: /proc/bus/usb' 1.116 mount -t usbfs usbfs /proc/bus/usb 1.117 status 1.118 fi 1.119 1.120 # Start syslogd and klogd 1.121 -echo -n "Starting system log daemon: syslogd..." 1.122 +echo -n 'Starting system log daemon: syslogd...' 1.123 syslogd -s $SYSLOGD_ROTATED_SIZE && status 1.124 -echo -n "Starting kernel log daemon: klogd..." 1.125 +echo -n 'Starting kernel log daemon: klogd...' 1.126 klogd && status 1.127 1.128 # Load all modules listed in config file 1.129 if [ "$LOAD_MODULES" ]; then 1.130 - colorize 33 "Loading Kernel modules..." 1.131 + colorize 33 'Loading Kernel modules...' 1.132 for mod in $LOAD_MODULES; do 1.133 echo -n "Loading module: $mod" 1.134 modprobe $mod 1.135 @@ -167,8 +170,8 @@ 1.136 1.137 # Call udevadm trigger to ensure /dev is fully populated now that all 1.138 # modules are loaded. 1.139 -if [ "$UDEV" = "yes" ]; then 1.140 - echo -n "Triggering udev events: --action=add" 1.141 +if [ "$UDEV" == 'yes' ]; then 1.142 + echo -n 'Triggering udev events: --action=add' 1.143 udevadm trigger --action=add 1.144 status 1.145 fi 1.146 @@ -182,13 +185,13 @@ 1.147 # Start X session. Dbus must be started before Xorg and other daemons. 1.148 # We started it here because X is run before RUN_DAEMONS. Sleep, in 1.149 # some in live mode we boot too fast and X can't initialize. 1.150 -if [ "$SCREEN" != "text" ] && [ "$LOGIN_MANAGER" ] && 1.151 +if [ "$SCREEN" != 'text' ] && [ "$LOGIN_MANAGER" ] && 1.152 [ -x /usr/bin/tazx ] && [ -s /etc/slitaz/applications.conf ] && 1.153 [ -x "/etc/init.d/$LOGIN_MANAGER" ]; then 1.154 - colorize 36 "Starting X environment..." 1.155 + colorize 36 'Starting X environment...' 1.156 # We need Xorg 40-Keyboard.conf and SliTaz applications.conf 1.157 - if [ ! -s "/etc/X11/xorg.conf.d/40-Keyboard.conf" ]; then 1.158 - echo "Configuring Xorg server..." && HOME="/root" 1.159 + if [ ! -s '/etc/X11/xorg.conf.d/40-Keyboard.conf' ]; then 1.160 + echo 'Configuring Xorg server...' && HOME='/root' 1.161 tazx init 1.162 fi 1.163 /etc/init.d/dbus start 1.164 @@ -205,7 +208,7 @@ 1.165 fi 1.166 1.167 # Back to a verbose mode 1.168 -(sleep 6 && echo "7 4 1 7" > /proc/sys/kernel/printk) & 1.169 +(sleep 6 && echo '7 4 1 7' > /proc/sys/kernel/printk) & 1.170 1.171 if [ "$MESSAGE" ]; then 1.172 newline