tazpanel rev 425
hardware.cgi: add cloop support
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Wed Mar 25 18:48:01 2015 +0100 (2015-03-25) |
parents | 49a4b40f7d73 |
children | 7488b357abd3 |
files | hardware.cgi |
line diff
1.1 --- a/hardware.cgi Wed Mar 25 15:08:09 2015 +0000 1.2 +++ b/hardware.cgi Wed Mar 25 18:48:01 2015 +0100 1.3 @@ -329,7 +329,7 @@ 1.4 device=$(GET loopdev) 1.5 lib crypto $device 1.6 case "$device" in 1.7 - /dev/loop*) 1.8 + /dev/*loop*) 1.9 set -- $(losetup | grep ^$device:) 1.10 [ -n "$3" ] && losetup -d $device 1.11 ro="" 1.12 @@ -499,7 +499,7 @@ 1.13 </thead> 1.14 <tbody> 1.15 EOT 1.16 -for devloop in $(ls /dev/loop[0-9]*); do 1.17 +for devloop in $(ls /dev/*loop[0-9]*); do 1.18 loop="${devloop#/dev/}" 1.19 case "$(cat /sys/block/$loop/ro 2>/dev/null)" in 1.20 0) ro="$(gettext "read/write")" ;;