slitaz-boot-scripts rev 242 4.1.1
Automated merge with http://repos.slitaz.org/slitaz-boot-scripts
author | Antoine Bodin <gokhlayeh@slitaz.org> |
---|---|
date | Sat Mar 26 19:30:20 2011 +0100 (2011-03-26) |
parents | 07c1d9c8ac36 68435a9c0843 |
children | 3a7340a21012 |
files | etc/init.d/bootopts.sh |
line diff
1.1 --- a/COPYING Thu Mar 24 14:20:00 2011 +0100 1.2 +++ b/COPYING Sat Mar 26 19:30:20 2011 +0100 1.3 @@ -9,17 +9,17 @@ 1.4 -------- 1.5 1.6 Les slitaz-boot-scripts des scripts libre ; vous pouvez les redistribuer et/ou 1.7 -les modifier conformément aux dispositions de la Licence Publique Générale GNU, 1.8 -telle que publiée par la Free Software Foundation ; version 3 de la 1.9 +les modifier conformément aux dispositions de la Licence Publique Générale GNU, 1.10 +telle que publiée par la Free Software Foundation ; version 3 de la 1.11 licence, ou encore (à votre choix) toute version ultérieure. 1.12 1.13 Les slitaz-boot-scripts sont distribués dans l'espoir qu'il sera utile, mais 1.14 -SANS AUCUNE GARANTIE ; sans même la garantie implicite de COMMERCIALISATION ou 1.15 -D'ADAPTATION À UN OBJET PARTICULIER. Pour plus de détails, voir la Licence 1.16 +SANS AUCUNE GARANTIE ; sans même la garantie implicite de COMMERCIALISATION ou 1.17 +D'ADAPTATION À UN OBJET PARTICULIER. Pour plus de détails, voir la Licence 1.18 Publique Générale GNU. 1.19 1.20 -Un exemplaire de la Licence Publique Générale GNU doit être fourni avec 1.21 -slitaz-boot-scripts si ce n'est pas le cas, écrivez à la Free Software 1.22 +Un exemplaire de la Licence Publique Générale GNU doit être fourni avec 1.23 +slitaz-boot-scripts si ce n'est pas le cas, écrivez à la Free Software 1.24 Foundation Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 1.25 1.26 1.27 @@ -33,7 +33,7 @@ 1.28 1.29 Slitaz-boot-scripts is distributed in the hope that it will be useful, but 1.30 WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 1.31 -FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 1.32 +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 1.33 more details. 1.34 1.35 You should have received a copy of the GNU General Public License
2.1 --- a/README Thu Mar 24 14:20:00 2011 +0100 2.2 +++ b/README Sat Mar 26 19:30:20 2011 +0100 2.3 @@ -1,4 +1,4 @@ 2.4 -README for slitaz-boot-scripts 2.5 +README for slitaz-boot-scripts 2.6 =============================================================================== 2.7 2.8
3.1 --- a/etc/init.d/bootopts.sh Thu Mar 24 14:20:00 2011 +0100 3.2 +++ b/etc/init.d/bootopts.sh Sat Mar 26 19:30:20 2011 +0100 3.3 @@ -5,7 +5,7 @@ 3.4 # 3.5 . /etc/init.d/rc.functions 3.6 3.7 -# Update fstab for swapon/swapoff 3.8 +# Update fstab for swapon/swapoff 3.9 add_swap_in_fstab() 3.10 { 3.11 grep -q "$1 " /etc/fstab || cat >> /etc/fstab <<EOT 3.12 @@ -84,7 +84,7 @@ 3.13 echo "$KEYMAP" > /etc/keymap.conf 3.14 status ;; 3.15 home=*) 3.16 - # Check for a specified home partition (home=*) and check for 3.17 + # Check for a specified home partition (home=*) and check for 3.18 # user home dir. Note: home=usb is a shorter and easier way to 3.19 # have home=/dev/sda1. 3.20 DEVICE=${opt#home=} 3.21 @@ -130,8 +130,8 @@ 3.22 else 3.23 rm -rf /tmp/$USER-files 3.24 fi 3.25 - # Install all packages in /home/boot/packages. In live CD and 3.26 - # USB mode the option home= mounts the device on /home, so we 3.27 + # Install all packages in /home/boot/packages. In live CD and 3.28 + # USB mode the option home= mounts the device on /home, so we 3.29 # already have a boot directory with the Kernel and rootfs. 3.30 if [ -d "/home/boot/packages" ]; then 3.31 for pkg in /home/boot/packages/*.tazpkg 3.32 @@ -151,7 +151,7 @@ 3.33 do 3.34 modprobe $mod 3.35 done 3.36 - grep -qs batt /etc/lxpanel/default/panels/panel || 3.37 + grep -qs batt /etc/lxpanel/default/panels/panel || 3.38 sed -i 's/= cpu/= batt\n}\n\nPlugin {\n type = cpu/' \ 3.39 /etc/lxpanel/default/panels/panel 2> /dev/null 3.40 # Enable Kernel Laptop mode. 3.41 @@ -172,7 +172,7 @@ 3.42 fi 3.43 done ;; 3.44 mount-packages) 3.45 - # Mount and install packages-XXX.iso (useful without Internet 3.46 + # Mount and install packages-XXX.iso (useful without Internet 3.47 # connection). 3.48 PKGSIGN="LABEL=\"packages-$(cat /etc/slitaz-release)\" TYPE=\"iso9660\"" 3.49 PKGDEV=$(blkid | grep "$PKGSIGN" | cut -d: -f1)
4.1 --- a/etc/init.d/network.sh Thu Mar 24 14:20:00 2011 +0100 4.2 +++ b/etc/init.d/network.sh Sat Mar 26 19:30:20 2011 +0100 4.3 @@ -5,9 +5,9 @@ 4.4 . /etc/init.d/rc.functions 4.5 4.6 if [ -z "$2" ]; then 4.7 - . /etc/network.conf 4.8 + . /etc/network.conf 4.9 else 4.10 - . $2 4.11 + . $2 4.12 fi 4.13 4.14 4.15 @@ -21,13 +21,13 @@ 4.16 echo -n "Configuring loopback..." 4.17 /sbin/ifconfig lo 127.0.0.1 up 4.18 /sbin/route add 127.0.0.1 lo 4.19 - status 4.20 + status 4.21 } 4.22 4.23 4.24 eth() { 4.25 # Use ethernet 4.26 - ifconfig $INTERFACE up 4.27 + ifconfig $INTERFACE up 4.28 } 4.29 4.30 wifi() { 4.31 @@ -35,7 +35,7 @@ 4.32 # essid any will work and the interface is autodetected. 4.33 if [ "$WIFI" = "yes" ] || grep -q "wifi" /proc/cmdline; then 4.34 ifconfig $INTERFACE down 4.35 - 4.36 + 4.37 # Confirm if $WIFI_INTERFACE is the wifi interface 4.38 if [ ! -d /sys/class/net/$WIFI_INTERFACE/wireless ]; then 4.39 echo "$WIFI_INTERFACE is not a wifi interface, changing it." 4.40 @@ -45,33 +45,33 @@ 4.41 done) 4.42 [ -n "$WIFI_INTERFACE" ] && sed -i "s/^WIFI_INTERFACE=.*/WIFI_INTERFACE=\"$WIFI_INTERFACE\"/" /etc/network.conf 4.43 fi 4.44 - 4.45 + 4.46 echo -n "Configuring $WIFI_INTERFACE..." 4.47 ifconfig $WIFI_INTERFACE up 4.48 if iwconfig $WIFI_INTERFACE | grep -q "Tx-Power"; then 4.49 iwconfig $WIFI_INTERFACE txpower on 4.50 fi 4.51 status 4.52 - 4.53 + 4.54 [ -n "$WPA_DRIVER" ] || WPA_DRIVER="wext" 4.55 - 4.56 - 4.57 + 4.58 + 4.59 IWCONFIG_ARGS="" 4.60 [ -n "$WIFI_MODE" ] && IWCONFIG_ARGS="$IWCONFIG_ARGS mode $WIFI_MODE" 4.61 [ -n "$WIFI_CHANNEL" ] && IWCONFIG_ARGS="$IWCONFIG_ARGS channel $WIFI_CHANNEL" 4.62 # unencrypted network 4.63 - if [ "$WIFI_KEY" == "" -o "$WIFI_KEY_TYPE" == "none" ]; 4.64 + if [ "$WIFI_KEY" == "" -o "$WIFI_KEY_TYPE" == "none" ]; 4.65 then 4.66 iwconfig $WIFI_INTERFACE essid "$WIFI_ESSID" $IWCONFIG_ARGS 4.67 fi 4.68 # encrypted network 4.69 [ -n "$WIFI_KEY" ] && case "$WIFI_KEY_TYPE" in 4.70 - wep|WEP) 4.71 + wep|WEP) 4.72 IWCONFIG_ARGS="$IWCONFIG_ARGS key $WIFI_KEY" 4.73 iwconfig $WIFI_INTERFACE essid "$WIFI_ESSID" $IWCONFIG_ARGS 4.74 # wpa_supplicant can also deal with wep encryption but iwconfig is preferred 4.75 # Tip: Use unquoted strings for hexadecimal key in wep_key0 4.76 -# cat /etc/wpa_supplicant.conf > /tmp/wpa.conf 4.77 +# cat /etc/wpa_supplicant.conf > /tmp/wpa.conf 4.78 # cat >> /tmp/wpa.conf <<EOF 4.79 #ctrl_interface=/var/run/wpa_supplicant 4.80 #ctrl_interface_group=0 4.81 @@ -86,9 +86,9 @@ 4.82 #} 4.83 #EOF 4.84 # echo "Starting wpa_supplicant for NONE/WEP..." 4.85 -# wpa_supplicant -B -W -c/tmp/wpa.conf -D$WPA_DRIVER -i$WIFI_INTERFACE 4.86 +# wpa_supplicant -B -W -c/tmp/wpa.conf -D$WPA_DRIVER -i$WIFI_INTERFACE 4.87 ;; 4.88 - wpa|WPA) cat /etc/wpa_supplicant.conf > /tmp/wpa.conf # load pre-configured multiple profiles 4.89 + wpa|WPA) cat /etc/wpa_supplicant.conf > /tmp/wpa.conf # load pre-configured multiple profiles 4.90 cat >> /tmp/wpa.conf <<EOF 4.91 ctrl_interface=/var/run/wpa_supplicant 4.92 ctrl_interface_group=0 4.93 @@ -97,15 +97,15 @@ 4.94 ssid="$WIFI_ESSID" 4.95 scan_ssid=1 4.96 proto=WPA RSN 4.97 - key_mgmt=WPA-PSK 4.98 + key_mgmt=WPA-PSK WPA-EAP 4.99 psk="$WIFI_KEY" 4.100 priority=5 4.101 } 4.102 EOF 4.103 echo "Starting wpa_supplicant for WPA-PSK..." 4.104 - wpa_supplicant -B -W -c/tmp/wpa.conf -D$WPA_DRIVER -i$WIFI_INTERFACE 4.105 + wpa_supplicant -B -W -c/tmp/wpa.conf -D$WPA_DRIVER -i$WIFI_INTERFACE 4.106 ;; 4.107 - any|ANY) cat /etc/wpa_supplicant.conf > /tmp/wpa.conf 4.108 + any|ANY) cat /etc/wpa_supplicant.conf > /tmp/wpa.conf 4.109 cat >> /tmp/wpa.conf <<EOF 4.110 ctrl_interface=/var/run/wpa_supplicant 4.111 ctrl_interface_group=0 4.112 @@ -121,14 +121,14 @@ 4.113 } 4.114 EOF 4.115 echo "Starting wpa_supplicant for any key type..." 4.116 - wpa_supplicant -B -W -c/tmp/wpa.conf -D$WPA_DRIVER -i$WIFI_INTERFACE 4.117 + wpa_supplicant -B -W -c/tmp/wpa.conf -D$WPA_DRIVER -i$WIFI_INTERFACE 4.118 ;; 4.119 esac 4.120 - 4.121 + 4.122 rm -f /tmp/wpa.conf 4.123 - 4.124 - INTERFACE=$WIFI_INTERFACE 4.125 - 4.126 + 4.127 + INTERFACE=$WIFI_INTERFACE 4.128 + 4.129 fi 4.130 4.131 } 4.132 @@ -136,21 +136,21 @@ 4.133 wpa() 4.134 { 4.135 DHCP_SCRIPT="/etc/init.d/wpa_action.sh" 4.136 - wpa_cli -a$DHCP_SCRIPT -B 4.137 + wpa_cli -a$DHCP_SCRIPT -B 4.138 } 4.139 4.140 dhcp() { 4.141 4.142 -# For a dynamic IP with DHCP. 4.143 +# For a dynamic IP with DHCP. 4.144 if [ "$DHCP" = "yes" ] ; then 4.145 - echo "Starting udhcpc client on: $INTERFACE..." 4.146 + echo "Starting udhcpc client on: $INTERFACE..." 4.147 if [ -d /var/run/wpa_supplicant ] && [ "$WIFI" = "yes" ]; then # wpa wireless && wpa_ctrl_open interface is up 4.148 - wpa 4.149 + wpa 4.150 else # fallback on udhcpc: wep, eth 4.151 /sbin/udhcpc -b -T 1 -A 12 -i $INTERFACE -p /var/run/udhcpc.$INTERFACE.pid 4.152 - fi 4.153 + fi 4.154 fi 4.155 - 4.156 + 4.157 } 4.158 4.159 static_ip() { 4.160 @@ -179,7 +179,7 @@ 4.161 echo "Killing all daemons" 4.162 killall udhcpc 4.163 killall wpa_supplicant 2>/dev/null 4.164 - 4.165 + 4.166 if iwconfig $WIFI_INTERFACE | grep -q "Tx-Power"; then 4.167 echo "Shutting down wifi card" 4.168 iwconfig $WIFI_INTERFACE txpower off 4.169 @@ -189,11 +189,11 @@ 4.170 Start() { 4.171 eth 4.172 wifi 4.173 - dhcp 4.174 + dhcp 4.175 static_ip 4.176 # change default lxpanel panel iface 4.177 [ -f /etc/lxpanel/default/panels/panel ] \ 4.178 - && sed -i "s/iface=.*/iface=$INTERFACE/" /etc/lxpanel/default/panels/panel 4.179 + && sed -i "s/iface=.*/iface=$INTERFACE/" /etc/lxpanel/default/panels/panel 4.180 } 4.181 4.182
5.1 --- a/etc/init.d/rcS Thu Mar 24 14:20:00 2011 +0100 5.2 +++ b/etc/init.d/rcS Sat Mar 26 19:30:20 2011 +0100 5.3 @@ -1,5 +1,5 @@ 5.4 #!/bin/sh 5.5 -# /etc/init.d/rcS - Initial boot script for SliTaz GNU/Linux. 5.6 +# /etc/init.d/rcS - Initial boot script for SliTaz GNU/Linux. 5.7 # Config file is : /etc/rcS.conf 5.8 # 5.9 # rcS is the main initialization script used to check fs, mount, clean, 5.10 @@ -118,7 +118,7 @@ 5.11 /bin/chmod 1777 /tmp/.X11-unix /tmp/.ICE-unix 5.12 status 5.13 5.14 -# Fast boot into X for HD install or custom Live system. We need 5.15 +# Fast boot into X for HD install or custom Live system. We need 5.16 # keymap settings since Xvesa dumps the console mapping and a correct 5.17 # slim configuration for screen resolution. DBUS and HAL must also start 5.18 # before X session (manual login or autologin) to have devices in PCmanFM. 5.19 @@ -160,17 +160,17 @@ 5.20 5.21 [ "$FBSPLASH" == "yes" ] && echo "50" > /etc/fbsplash/fifo 5.22 5.23 -# Handle kernel cmdline parameter modprobe=<module_list> 5.24 +# Handle kernel cmdline parameter modprobe=<module_list> 5.25 if [ -n "$MODPROBE" ]; then 5.26 MODULES=`sed -e 's/.* modprobe=\([^ ]*\).*/\1/' -e 's/,/\n/g' < /proc/cmdline` 5.27 for i in $MODULES; do 5.28 echo -n "Loading kernel module $i" 5.29 /sbin/modprobe $i 5.30 - status 5.31 + status 5.32 done 5.33 fi 5.34 5.35 -# Handle kernel cmdline parameter config=<device>,<path> to source a 5.36 +# Handle kernel cmdline parameter config=<device>,<path> to source a 5.37 # disk init script 5.38 if [ -n "$CONFIG" ]; then 5.39 DEVICE=${CONFIG%,*} 5.40 @@ -192,7 +192,7 @@ 5.41 . /mnt/$SCRIPT 5.42 /bin/umount /mnt 2> /dev/null || true 5.43 fi 5.44 - status 5.45 + status 5.46 fi 5.47 5.48 # Mount /proc/bus/usb. 5.49 @@ -246,7 +246,7 @@ 5.50 5.51 [ "$FBSPLASH" == "yes" ] && echo "90" > /etc/fbsplash/fifo 5.52 5.53 -# Re-source main config file. In Live mode, daemons list can be modified 5.54 +# Re-source main config file. In Live mode, daemons list can be modified 5.55 # by boot options (screen=text will remove slim). 5.56 . /etc/rcS.conf 5.57
6.1 --- a/etc/init.d/wpa_action.sh Thu Mar 24 14:20:00 2011 +0100 6.2 +++ b/etc/init.d/wpa_action.sh Sat Mar 26 19:30:20 2011 +0100 6.3 @@ -1,9 +1,9 @@ 6.4 #!/bin/sh 6.5 INTERFACE=$1 6.6 - 6.7 + 6.8 # For a dynamic IP with DHCP. 6.9 if [ "$2" = "CONNECTED" ]; then 6.10 - [ -f /var/run/udhcpc.$INTERFACE.pid] && killall udhcpc 6.11 + [ -f /var/run/udhcpc.$INTERFACE.pid] && killall udhcpc 6.12 /sbin/udhcpc -b -i $INTERFACE -p /var/run/udhcpc.$INTERFACE.pid 6.13 elif [ "$2" = "DISCONNECTED" ]; then 6.14 /sbin/udhcpc -b -i $INTERFACE -p /var/run/udhcpc.$INTERFACE.pid
7.1 --- a/etc/inittab Thu Mar 24 14:20:00 2011 +0100 7.2 +++ b/etc/inittab Sat Mar 26 19:30:20 2011 +0100 7.3 @@ -11,7 +11,7 @@ 7.4 tty5::respawn:/sbin/getty 38400 tty5 7.5 tty6::respawn:/sbin/getty 38400 tty6 7.6 7.7 -# Stuff to do when restarting the init 7.8 +# Stuff to do when restarting the init 7.9 # process, or before rebooting. 7.10 ::restart:/etc/init.d/rc.shutdown 7.11 ::restart:/sbin/init
8.1 --- a/etc/rcS.conf Thu Mar 24 14:20:00 2011 +0100 8.2 +++ b/etc/rcS.conf Sat Mar 26 19:30:20 2011 +0100 8.3 @@ -13,7 +13,7 @@ 8.4 # /etc/fstab. Example: CHECK_FS="/dev/hda5 /dev/hdb1" 8.5 CHECK_FS="" 8.6 8.7 -# Fast boot into X by setting the system keymap-locale and starting 8.8 +# Fast boot into X by setting the system keymap-locale and starting 8.9 # the Slim login manager earlier at boot time. If fast X is enabled 8.10 # then dbus, hald and slim can be removed from RUN_DAEMONS. 8.11 FAST_BOOT_X="no"