wok diff get-b43legacy-firmware/stuff/get-b43legacy-firmware @ rev 1773

hardinfo: fix usb
author Pascal Bellard <pascal.bellard@slitaz.org>
date Fri Nov 28 17:23:48 2008 +0000 (2008-11-28)
parents c56a51e96041
children
line diff
     1.1 --- a/get-b43legacy-firmware/stuff/get-b43legacy-firmware	Wed Jul 23 19:14:41 2008 +0200
     1.2 +++ b/get-b43legacy-firmware/stuff/get-b43legacy-firmware	Fri Nov 28 17:23:48 2008 +0000
     1.3 @@ -9,6 +9,7 @@
     1.4  VERSION=3.130.20.0
     1.5  TARBALL=$DIR-$VERSION.o
     1.6  WGET_URL="http://downloads.openwrt.org/sources/$TARBALL"
     1.7 +ROOT="$1"
     1.8  
     1.9  # Check if user is root to install.
    1.10  if test $(id -u) != 0 ; then
    1.11 @@ -18,7 +19,7 @@
    1.12  fi
    1.13  
    1.14  # Avoid reinstall
    1.15 -if [ -d /var/lib/tazpkg/installed/b43legacy-firmware ]; then
    1.16 +if [ -d $ROOT/var/lib/tazpkg/installed/b43legacy-firmware ]; then
    1.17  	echo -e "\nb43legacy-firmware package is already installed.\n"
    1.18  	exit 0
    1.19  fi
    1.20 @@ -47,7 +48,7 @@
    1.21  VERSION="$VERSION"
    1.22  CATEGORY="non-free"
    1.23  SHORT_DESC="Broadcom b43legacy firmware."
    1.24 -DEPENDS="b43-fwcutter"
    1.25 +DEPENDS="linux-wireless b43-fwcutter wireless_tools"
    1.26  WEB_SITE="http://downloads.openwrt.org/"
    1.27  EOT
    1.28  
    1.29 @@ -55,18 +56,20 @@
    1.30  tazpkg pack b43legacy-firmware-$VERSION
    1.31  
    1.32  # Install pseudo package
    1.33 -tazpkg install b43legacy-firmware-$VERSION.tazpkg
    1.34 +tazpkg install b43legacy-firmware-$VERSION.tazpkg --root=$ROOT
    1.35  
    1.36  # Clean
    1.37  cd /tmp
    1.38  rm -rf $TARBALL $DIR-$VERSION
    1.39  
    1.40  # Load b43legacy module
    1.41 -echo "Loading module: b43legacy..."
    1.42 -modprobe b43legacy
    1.43 -sleep 1
    1.44 +if [ -z "$ROOT" ]; then
    1.45 +	echo "Loading module: b43legacy..."
    1.46 +	modprobe b43legacy
    1.47 +	sleep 1
    1.48 +fi
    1.49  
    1.50  # Configure /etc/network.conf and start connexion
    1.51 -sed -i s/'WIFI="no"'/'WIFI="yes"'/ /etc/network.conf
    1.52 -/etc/init.d/network.sh restart
    1.53 +sed -i s/'WIFI="no"'/'WIFI="yes"'/ $ROOT/etc/network.conf
    1.54 +[ -z "$ROOT" ] && /etc/init.d/network.sh restart
    1.55