more generic drive detection

git-svn-id: file:///root/webif/svn/pkg/webif/trunk@2698 2a923420-c742-0410-a762-8d5b09965624
This commit is contained in:
hummypkg 2016-02-22 23:03:31 +00:00
parent 347f7989ec
commit 8fd5cdb062

View File

@ -603,14 +603,14 @@ proc {system usbmounts} {{full 0}} {
set num 0
catch {
set num [
exec grep -cE {/media/(usb-|gpt-|exfat-)?drive} \
exec grep -cE {/media/([a-z-]+-)?drive} \
/proc/mounts]
}
return $num
}
set ret {}
if {[catch {
set lines [exec grep -E {media/(usb-|gpt-|exfat-)?drive} \
set lines [exec grep -E {media/([a-z-]+-)?drive} \
/proc/mounts]
}]} { return $ret }
foreach line [split $lines "\n"] {