# HG changeset patch # User Christophe Lincoln # Date 1235518442 -3600 # Node ID 7f56f98aef11a8c739f1c4ddfd83449d665a7bcc # Parent de639c1eb4db80cc97ada7b97e0a3becec516872 hwconf.sh: use Tazhw to auto configure PCI/USB devices diff -r de639c1eb4db -r 7f56f98aef11 AUTHORS --- a/AUTHORS Mon Feb 23 17:28:35 2009 +0000 +++ b/AUTHORS Wed Feb 25 00:34:02 2009 +0100 @@ -1,3 +1,4 @@ Christophe Lincoln Pascal Bellard +Eric Joseph-Alexandre Andrew Miller diff -r de639c1eb4db -r 7f56f98aef11 COPYING --- a/COPYING Mon Feb 23 17:28:35 2009 +0000 +++ b/COPYING Wed Feb 25 00:34:02 2009 +0100 @@ -2,7 +2,7 @@ =============================================================================== -Copyright (c) 2007-2008 SliTaz GNU/Linux +Copyright (c) 2007-2009 SliTaz GNU/Linux Français diff -r de639c1eb4db -r 7f56f98aef11 README --- a/README Mon Feb 23 17:28:35 2009 +0000 +++ b/README Wed Feb 25 00:34:02 2009 +0100 @@ -1,4 +1,4 @@ -README for slitaz-boot-scripts 2008 +README for slitaz-boot-scripts 2009 =============================================================================== diff -r de639c1eb4db -r 7f56f98aef11 etc/init.d/hwconf.sh --- a/etc/init.d/hwconf.sh Mon Feb 23 17:28:35 2009 +0000 +++ b/etc/init.d/hwconf.sh Wed Feb 25 00:34:02 2009 +0100 @@ -3,47 +3,10 @@ # . /etc/init.d/rc.functions -# Detect PCI devices and load kernel module only at first boot -# or in LiveCD mode. +# Detect PCI and USB devices with Tazhw from slitaz-tools. We load +# kernel module only at first boot or in LiveCD mode. if [ ! -s /var/lib/detected-modules ]; then - - . /etc/rcS.conf - - # We need module_name to match output of lsmod. - echo "Detecting PCI devices..." - MODULES_LIST=`lspci -k | grep "modules" | cut -d ":" -f 2 | sed s/-/_/g` - for mod in $MODULES_LIST - do - if ! lsmod | grep -q "$mod"; then - if [ -f "$(modprobe -l $mod)" ]; then - echo "Loading Kernel modules: $mod" - detect="$detect $mod" - /sbin/modprobe $mod - else - echo "Missing module: $mod" - fi - fi - done - # yenta_socket = laptop - if `lsmod | grep -q "yenta_socket"`; then - detect="$detect ac battery" - modprobe ac - modprobe battery - sed -i 's/= cpu/= batt\n}\n\nPlugin {\n type = cpu/' \ - /etc/lxpanel/default/panels/panel 2> /dev/null - fi - echo "$detect" > /var/lib/detected-modules - # Now add modules to rcS.conf - load=`echo "$LOAD_MODULES $detect" | sed s/" "/" "/g` - sed -i s/"LOAD_MODULES=\"$LOAD_MODULES\""/"LOAD_MODULES=\"$load\""/ \ - /etc/rcS.conf - # Retry a network connection with DHCP. - if ifconfig -a | grep -q "eth0"; then - if [ ! -f /var/run/udhcpc.eth0.pid ]; then - echo "Starting udhcpc client on: eth0... " - /sbin/udhcpc -b -i eth0 -p /var/run/udhcpc.eth0.pid - fi - fi + /sbin/tazhw init fi # Sound configuration stuff. First check if sound=no and remove all