slitaz-tools rev 832 5.6

tazhw: use /sys/bus/usb to find usb devices and mods
author Christophe Lincoln <pankso@slitaz.org>
date Wed Jan 29 12:05:17 2014 +0100 (2014-01-29)
parents 6fec8f07e755
children 4a0af01c775c
files po/slitaz-boxes/fr.po tinyutils/tazhw
line diff
     1.1 --- a/po/slitaz-boxes/fr.po	Wed Jan 29 02:12:29 2014 +0100
     1.2 +++ b/po/slitaz-boxes/fr.po	Wed Jan 29 12:05:17 2014 +0100
     1.3 @@ -8,7 +8,7 @@
     1.4  "Project-Id-Version: SliTaz Boxes\n"
     1.5  "Report-Msgid-Bugs-To: \n"
     1.6  "POT-Creation-Date: 2013-09-06 02:11+0300\n"
     1.7 -"PO-Revision-Date: 2012-05-02 16:00+0100\n"
     1.8 +"PO-Revision-Date: 2014-01-29 02:20+0100\n"
     1.9  "Last-Translator: Christophe Lincoln <pankso@slitaz.org>\n"
    1.10  "Language-Team: French\n"
    1.11  "Language: \n"
    1.12 @@ -21,13 +21,15 @@
    1.13  msgid "Small Wi-Fi utility to quickly connect to a network."
    1.14  msgstr ""
    1.15  
    1.16 -#: boxes/wifi-box:16 boxes/burn-box:33 boxes/scp-box:36
    1.17 +#: boxes/wifi-box:16
    1.18 +#: boxes/burn-box:33
    1.19 +#: boxes/scp-box:36
    1.20  msgid "Usage:"
    1.21  msgstr "Utilisation:"
    1.22  
    1.23  #: boxes/wifi-box:17
    1.24  msgid "interface"
    1.25 -msgstr ""
    1.26 +msgstr "interface"
    1.27  
    1.28  #: boxes/wifi-box:38
    1.29  msgid "any"
    1.30 @@ -39,9 +41,11 @@
    1.31  
    1.32  #: boxes/wifi-box:38
    1.33  msgid "none"
    1.34 -msgstr ""
    1.35 +msgstr "aucune"
    1.36  
    1.37 -#: boxes/wifi-box:38 boxes/wifi-box:49 boxes/wifi-box:64
    1.38 +#: boxes/wifi-box:38
    1.39 +#: boxes/wifi-box:49
    1.40 +#: boxes/wifi-box:64
    1.41  msgid "-"
    1.42  msgstr ""
    1.43  
    1.44 @@ -87,29 +91,32 @@
    1.45  
    1.46  #: boxes/wifi-box:122
    1.47  msgid "Start Wi-Fi"
    1.48 -msgstr ""
    1.49 +msgstr "Démarrer le Wi-Fi"
    1.50  
    1.51  #: boxes/wifi-box:122
    1.52  msgid "Stop Wi-Fi"
    1.53 -msgstr ""
    1.54 +msgstr "Stopper le Wi-Fi"
    1.55  
    1.56  #: boxes/burn-box:32
    1.57  msgid "Burn-box a small front end to cdrkit powered by Yad/GTK."
    1.58 -msgstr ""
    1.59 +msgstr "Burn Box - Petite interface Yad/GTK à l'outil de gravage cdrkit"
    1.60  
    1.61 -#: boxes/burn-box:34 boxes/scp-box:37
    1.62 +#: boxes/burn-box:34
    1.63 +#: boxes/scp-box:37
    1.64  msgid "command"
    1.65 -msgstr ""
    1.66 +msgstr "commande"
    1.67  
    1.68 -#: boxes/burn-box:34 boxes/scp-box:37
    1.69 +#: boxes/burn-box:34
    1.70 +#: boxes/scp-box:37
    1.71  msgid "option"
    1.72 -msgstr ""
    1.73 +msgstr "option"
    1.74  
    1.75  #: boxes/burn-box:34
    1.76  msgid "file"
    1.77 -msgstr ""
    1.78 +msgstr "fichier"
    1.79  
    1.80 -#: boxes/burn-box:36 boxes/scp-box:39
    1.81 +#: boxes/burn-box:36
    1.82 +#: boxes/scp-box:39
    1.83  msgid "Commands:"
    1.84  msgstr "Commandes:"
    1.85  
    1.86 @@ -129,19 +136,25 @@
    1.87  msgid "Erase a RW disk"
    1.88  msgstr ""
    1.89  
    1.90 -#: boxes/burn-box:43 boxes/scp-box:42 boxes/scp-box:70
    1.91 +#: boxes/burn-box:43
    1.92 +#: boxes/scp-box:42
    1.93 +#: boxes/scp-box:70
    1.94  msgid "Options:"
    1.95  msgstr "Options:"
    1.96  
    1.97 -#: boxes/burn-box:45 boxes/burn-box:50 boxes/burn-box:51
    1.98 +#: boxes/burn-box:45
    1.99 +#: boxes/burn-box:50
   1.100 +#: boxes/burn-box:51
   1.101  msgid "/path/to/image.iso"
   1.102 -msgstr ""
   1.103 +msgstr "/chemin/du/fichier.iso"
   1.104  
   1.105 -#: boxes/burn-box:46 boxes/scp-box:44
   1.106 +#: boxes/burn-box:46
   1.107 +#: boxes/scp-box:44
   1.108  msgid "/path/to/directory"
   1.109 -msgstr ""
   1.110 +msgstr "/chemin/du/dossier"
   1.111  
   1.112 -#: boxes/burn-box:48 boxes/scp-box:46
   1.113 +#: boxes/burn-box:48
   1.114 +#: boxes/scp-box:46
   1.115  msgid "Examples:"
   1.116  msgstr "Exemples:"
   1.117  
   1.118 @@ -156,9 +169,8 @@
   1.119  msgstr "Ceci n'est pas une image ISO: \"$iso\""
   1.120  
   1.121  #: boxes/burn-box:100
   1.122 -#, fuzzy
   1.123  msgid "Burn-box"
   1.124 -msgstr "Graver"
   1.125 +msgstr "Burn-box"
   1.126  
   1.127  #: boxes/burn-box:102
   1.128  msgid "Burn ISO images and audio files [data in next releases]"
   1.129 @@ -198,7 +210,7 @@
   1.130  
   1.131  #: boxes/burn-box:137
   1.132  msgid "Burning Audio"
   1.133 -msgstr ""
   1.134 +msgstr "Gravage de fichiers audio"
   1.135  
   1.136  #: boxes/burn-box:149
   1.137  msgid "Wodim Help"
   1.138 @@ -215,25 +227,25 @@
   1.139  msgstr "Le dossier audio \"$audio\" est manquant"
   1.140  
   1.141  #: boxes/burn-box:166
   1.142 -#, fuzzy
   1.143  msgid "Blank disk"
   1.144  msgstr "Effacer le CD"
   1.145  
   1.146  #: boxes/scp-box:34
   1.147  msgid "SCP Box - Small front end to the secure file copy utility."
   1.148 -msgstr ""
   1.149 +msgstr "SCP Box - Petite interface à l'outils de copies sécurisées scp"
   1.150  
   1.151  #: boxes/scp-box:40
   1.152  msgid "List all known hosts"
   1.153  msgstr "Liste tous les noms d'hôte connu"
   1.154  
   1.155 -#: boxes/scp-box:43 boxes/scp-box:47
   1.156 +#: boxes/scp-box:43
   1.157 +#: boxes/scp-box:47
   1.158  msgid "/path/to/file"
   1.159 -msgstr ""
   1.160 +msgstr "/chemin/du/fichier"
   1.161  
   1.162  #: boxes/scp-box:62
   1.163  msgid "SCP Box"
   1.164 -msgstr ""
   1.165 +msgstr "SCP Box"
   1.166  
   1.167  #: boxes/scp-box:65
   1.168  msgid "<b>Secure copy</b> - Copy files remotely with scp"
     2.1 --- a/tinyutils/tazhw	Wed Jan 29 02:12:29 2014 +0100
     2.2 +++ b/tinyutils/tazhw	Wed Jan 29 12:05:17 2014 +0100
     2.3 @@ -104,21 +104,17 @@
     2.4  
     2.5  # Detect all USB devices.
     2.6  detect_usb_devices() {
     2.7 -	if [ -f /proc/bus/usb/devices -a ! -s /var/lib/detected-usb-modules ]; then
     2.8 -		rm -f /var/lib/detected-usb-modules
     2.9 -		cat /proc/bus/usb/devices | grep "Vendor" | while read line ; do
    2.10 -			ID=$(echo "$line" | awk '{ print $2,$3 }' | sed 's/ /   /' | \
    2.11 -				sed 's/Vendor=/0x/' | sed 's/ProdID=/0x/')
    2.12 -			if grep -q "$ID" /lib/modules/$(uname -r)/modules.usbmap; then
    2.13 -				mod=$(grep "$ID" /lib/modules/$(uname -r)/modules.usbmap | \
    2.14 -					awk '{ print $1 }')
    2.15 -				prod=$(grep -A 2 "$line" /proc/bus/usb/devices | grep Product | \
    2.16 -					cut -d"=" -f2)
    2.17 -				echo "$prod"
    2.18 -				check_firmware
    2.19 -				load_module
    2.20 -				echo " $mod" >> /var/lib/detected-usb-modules
    2.21 -			fi
    2.22 +	if [ -d /sys/bus/usb ]; then
    2.23 +		for product in /sys/bus/usb/devices/*/product
    2.24 +		do
    2.25 +			path=$(dirname $product)
    2.26 +			product=$(cat $product)
    2.27 +			config=$(cat $path/configuration)
    2.28 +			debug "$path"
    2.29 +			. $path/[0-9]*/uevent
    2.30 +			[ ! "$DRIVER" ] && DRIVER="(none)"
    2.31 +			echo "$product $config $(indent 40 $DRIVER)"
    2.32 +			unset DRIVER
    2.33  		done
    2.34  	fi
    2.35  }