# HG changeset patch # User Christophe Lincoln # Date 1208511144 -7200 # Node ID f1529c400e818c79be7a11fcb94b0b1aa64d1cb6 # Parent c1eba972e0737706a78bb368e2fcddd7bdb3b1fb Add wifi config and boot option (experimental) diff -r c1eba972e073 -r f1529c400e81 etc/init.d/bootopts.sh --- a/etc/init.d/bootopts.sh Fri Apr 18 11:28:18 2008 +0200 +++ b/etc/init.d/bootopts.sh Fri Apr 18 11:32:24 2008 +0200 @@ -98,9 +98,11 @@ # Laptop option to load ac and battery Kernel modules. if grep -q "laptop" /proc/cmdline; then - echo "Loading laptop modules: ac battery..." + echo "Loading laptop modules: ac, battery, yenta_socket..." modprobe ac modprobe battery + modprobe yenta_socket + depmod -a fi # Check for a Window Manager (for a flavor, default WM can be changed diff -r c1eba972e073 -r f1529c400e81 etc/init.d/network.sh --- a/etc/init.d/network.sh Fri Apr 18 11:28:18 2008 +0200 +++ b/etc/init.d/network.sh Fri Apr 18 11:32:24 2008 +0200 @@ -18,15 +18,22 @@ # For a dynamic IP with DHCP. if [ "$DHCP" = "yes" ] ; then - echo "Starting udhcpc client on: $INTERFACE... " - /sbin/udhcpc -b -i $INTERFACE -p /var/run/udhcpc.$INTERFACE.pid + echo "Starting udhcpc client on: $INTERFACE... " + /sbin/udhcpc -b -i $INTERFACE -p /var/run/udhcpc.$INTERFACE.pid fi # For a static IP. if [ "$STATIC" = "yes" ] ; then - echo "Configuring static IP on $INTERFACE: $IP... " - /sbin/ifconfig $INTERFACE $IP netmask $NETMASK up - /sbin/route add default gateway $GATEWAY - echo "nameserver $DNS_SERVER" > /etc/resolv.conf + echo "Configuring static IP on $INTERFACE: $IP... " + /sbin/ifconfig $INTERFACE $IP netmask $NETMASK up + /sbin/route add default gateway $GATEWAY + echo "nameserver $DNS_SERVER" > /etc/resolv.conf fi +# For wifi (experimental). +if [ "$WIFI" = "yes" -o grep -q "wifi" /proc/cmdline ] ; then + iwconfig $WIFI_INTERFACE essid $ESSID + echo "Starting udhcpc client on: $INTERFACE... " + /sbin/udhcpc -b -i $WIFI_INTERFACE \ + -p /var/run/udhcpc.$WIFI_INTERFACE.pid +fi