slitaz-boot-scripts rev 67
Add wifi config and boot option (experimental)
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Fri Apr 18 11:32:24 2008 +0200 (2008-04-18) |
parents | c1eba972e073 |
children | 42c76146fbcd |
files | etc/init.d/bootopts.sh etc/init.d/network.sh |
line diff
1.1 --- a/etc/init.d/bootopts.sh Fri Apr 18 11:28:18 2008 +0200 1.2 +++ b/etc/init.d/bootopts.sh Fri Apr 18 11:32:24 2008 +0200 1.3 @@ -98,9 +98,11 @@ 1.4 1.5 # Laptop option to load ac and battery Kernel modules. 1.6 if grep -q "laptop" /proc/cmdline; then 1.7 - echo "Loading laptop modules: ac battery..." 1.8 + echo "Loading laptop modules: ac, battery, yenta_socket..." 1.9 modprobe ac 1.10 modprobe battery 1.11 + modprobe yenta_socket 1.12 + depmod -a 1.13 fi 1.14 1.15 # Check for a Window Manager (for a flavor, default WM can be changed
2.1 --- a/etc/init.d/network.sh Fri Apr 18 11:28:18 2008 +0200 2.2 +++ b/etc/init.d/network.sh Fri Apr 18 11:32:24 2008 +0200 2.3 @@ -18,15 +18,22 @@ 2.4 2.5 # For a dynamic IP with DHCP. 2.6 if [ "$DHCP" = "yes" ] ; then 2.7 - echo "Starting udhcpc client on: $INTERFACE... " 2.8 - /sbin/udhcpc -b -i $INTERFACE -p /var/run/udhcpc.$INTERFACE.pid 2.9 + echo "Starting udhcpc client on: $INTERFACE... " 2.10 + /sbin/udhcpc -b -i $INTERFACE -p /var/run/udhcpc.$INTERFACE.pid 2.11 fi 2.12 2.13 # For a static IP. 2.14 if [ "$STATIC" = "yes" ] ; then 2.15 - echo "Configuring static IP on $INTERFACE: $IP... " 2.16 - /sbin/ifconfig $INTERFACE $IP netmask $NETMASK up 2.17 - /sbin/route add default gateway $GATEWAY 2.18 - echo "nameserver $DNS_SERVER" > /etc/resolv.conf 2.19 + echo "Configuring static IP on $INTERFACE: $IP... " 2.20 + /sbin/ifconfig $INTERFACE $IP netmask $NETMASK up 2.21 + /sbin/route add default gateway $GATEWAY 2.22 + echo "nameserver $DNS_SERVER" > /etc/resolv.conf 2.23 fi 2.24 2.25 +# For wifi (experimental). 2.26 +if [ "$WIFI" = "yes" -o grep -q "wifi" /proc/cmdline ] ; then 2.27 + iwconfig $WIFI_INTERFACE essid $ESSID 2.28 + echo "Starting udhcpc client on: $INTERFACE... " 2.29 + /sbin/udhcpc -b -i $WIFI_INTERFACE \ 2.30 + -p /var/run/udhcpc.$WIFI_INTERFACE.pid 2.31 +fi