# HG changeset patch # User Pascal Bellard # Date 1430411825 -7200 # Node ID 12e726724a741d5baca42c05b02340864bd9b780 # Parent 836e45b5567b90fc5830022fc0a41ccff36b2ec5 hardware.cgi: busybox lsusb support diff -r 836e45b5567b -r 12e726724a74 hardware.cgi --- a/hardware.cgi Thu Apr 30 02:25:59 2015 +0300 +++ b/hardware.cgi Thu Apr 30 18:37:05 2015 +0200 @@ -27,6 +27,25 @@ done 2> /dev/null | sed 's/ */ /g' } +lsusb_vd() { + if lsusb --help 2>&1 | grep -qi busybox ; then + for i in /sys/class/usb_device/*/device ; do + grep -qs ${1%:*} $i/idVendor || continue + grep -qs ${1#*:} $i/idProduct || continue + ( cd $i ; for j in * ; do + [ -f $j -a -r $j ] || continue + case "$j" in + descriptors|remove) continue + esac + printf "%-20s %s\n" $j "$(xargs echo < $j)" + done ) + break + done + else + lsusb -vd $1 | syntax_highlighter lsusb + fi +} + lsusb_table() { cat < @@ -40,11 +59,12 @@ EOT - lsusb | sed 's|^Bus \([0-9]*\)|\1|; - s| Device \([0-9]*\):|\1|; - s| ID \([^:]*:[^ ]*\)|\1|; - s| ||2; - s|.*$|\0|' + lsusb | while read x b y d z id name ; do + echo "$b${d%:}$id$name" + done echo "" } @@ -185,7 +205,7 @@ EOT [ "$vidpid" != 'lsusb' ] && cat < -
$(lsusb -vd $vidpid | syntax_highlighter lsusb)
+
$(lsusb_vd $vidpid)
EOT ;; @@ -407,9 +427,11 @@ 1) disktype="cd" ;; esac + radio="" + [ "$REMOTE_USER" == "root" ] || radio="" cat < - $(blkid $fs | sed '/LABEL=/!d;s/.*LABEL="\([^"]*\).*/\1/') $type diff -r 836e45b5567b -r 12e726724a74 po/fr.po --- a/po/fr.po Thu Apr 30 02:25:59 2015 +0300 +++ b/po/fr.po Thu Apr 30 18:37:05 2015 +0200 @@ -657,7 +657,7 @@ #: hardware.cgi:480 msgid "Pass" -msgstr "Mot de passe :" +msgstr "Passe" #: hardware.cgi:502 msgid "Loop devices" diff -r 836e45b5567b -r 12e726724a74 tazpanel --- a/tazpanel Thu Apr 30 02:25:59 2015 +0300 +++ b/tazpanel Thu Apr 30 18:37:05 2015 +0200 @@ -41,7 +41,6 @@ start Start tazpanel daemon stop Stop tazpanel daemon restart Restart tazpanel daemon - passwd Changing TazPanel password for root (also, short command -p) Open TazPanel page in the browser, where is one of: boot, hardware, help, index, installer, live, network, settings, pkgs If is empty, index page will open in the browser. @@ -71,13 +70,6 @@ status ;; restart) tazpanel stop; sleep 1; tazpanel start;; - passwd|-p) - echo - _ 'Changing password for TazPanel' - _n 'New password: ' && read pass - sed -i "s/\/:root:.*/\/:root:$pass/" $HTTPD_CONF - _ 'Password changed successfully' - echo ;; *) . /etc/slitaz/applications.conf USER_CONFIG="$HOME/.config/slitaz/applications.conf"