slitaz-boot-scripts rev 139
hwconf.sh: use Tazhw to auto configure PCI/USB devices
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Wed Feb 25 00:34:02 2009 +0100 (2009-02-25) |
parents | de639c1eb4db |
children | ddb05cd33971 |
files | AUTHORS COPYING README etc/init.d/hwconf.sh |
line diff
1.1 --- a/AUTHORS Mon Feb 23 17:28:35 2009 +0000 1.2 +++ b/AUTHORS Wed Feb 25 00:34:02 2009 +0100 1.3 @@ -1,3 +1,4 @@ 1.4 Christophe Lincoln <pankso@slitaz.org> 1.5 Pascal Bellard <pascal.bellard@slitaz.org> 1.6 +Eric Joseph-Alexandre <erjo@slitaz.org> 1.7 Andrew Miller <spode@spodesabode.com>
2.1 --- a/COPYING Mon Feb 23 17:28:35 2009 +0000 2.2 +++ b/COPYING Wed Feb 25 00:34:02 2009 +0100 2.3 @@ -2,7 +2,7 @@ 2.4 =============================================================================== 2.5 2.6 2.7 -Copyright (c) 2007-2008 SliTaz GNU/Linux 2.8 +Copyright (c) 2007-2009 SliTaz GNU/Linux 2.9 2.10 2.11 Français
3.1 --- a/README Mon Feb 23 17:28:35 2009 +0000 3.2 +++ b/README Wed Feb 25 00:34:02 2009 +0100 3.3 @@ -1,4 +1,4 @@ 3.4 -README for slitaz-boot-scripts 2008 3.5 +README for slitaz-boot-scripts 2009 3.6 =============================================================================== 3.7 3.8
4.1 --- a/etc/init.d/hwconf.sh Mon Feb 23 17:28:35 2009 +0000 4.2 +++ b/etc/init.d/hwconf.sh Wed Feb 25 00:34:02 2009 +0100 4.3 @@ -3,47 +3,10 @@ 4.4 # 4.5 . /etc/init.d/rc.functions 4.6 4.7 -# Detect PCI devices and load kernel module only at first boot 4.8 -# or in LiveCD mode. 4.9 +# Detect PCI and USB devices with Tazhw from slitaz-tools. We load 4.10 +# kernel module only at first boot or in LiveCD mode. 4.11 if [ ! -s /var/lib/detected-modules ]; then 4.12 - 4.13 - . /etc/rcS.conf 4.14 - 4.15 - # We need module_name to match output of lsmod. 4.16 - echo "Detecting PCI devices..." 4.17 - MODULES_LIST=`lspci -k | grep "modules" | cut -d ":" -f 2 | sed s/-/_/g` 4.18 - for mod in $MODULES_LIST 4.19 - do 4.20 - if ! lsmod | grep -q "$mod"; then 4.21 - if [ -f "$(modprobe -l $mod)" ]; then 4.22 - echo "Loading Kernel modules: $mod" 4.23 - detect="$detect $mod" 4.24 - /sbin/modprobe $mod 4.25 - else 4.26 - echo "Missing module: $mod" 4.27 - fi 4.28 - fi 4.29 - done 4.30 - # yenta_socket = laptop 4.31 - if `lsmod | grep -q "yenta_socket"`; then 4.32 - detect="$detect ac battery" 4.33 - modprobe ac 4.34 - modprobe battery 4.35 - sed -i 's/= cpu/= batt\n}\n\nPlugin {\n type = cpu/' \ 4.36 - /etc/lxpanel/default/panels/panel 2> /dev/null 4.37 - fi 4.38 - echo "$detect" > /var/lib/detected-modules 4.39 - # Now add modules to rcS.conf 4.40 - load=`echo "$LOAD_MODULES $detect" | sed s/" "/" "/g` 4.41 - sed -i s/"LOAD_MODULES=\"$LOAD_MODULES\""/"LOAD_MODULES=\"$load\""/ \ 4.42 - /etc/rcS.conf 4.43 - # Retry a network connection with DHCP. 4.44 - if ifconfig -a | grep -q "eth0"; then 4.45 - if [ ! -f /var/run/udhcpc.eth0.pid ]; then 4.46 - echo "Starting udhcpc client on: eth0... " 4.47 - /sbin/udhcpc -b -i eth0 -p /var/run/udhcpc.eth0.pid 4.48 - fi 4.49 - fi 4.50 + /sbin/tazhw init 4.51 fi 4.52 4.53 # Sound configuration stuff. First check if sound=no and remove all