From d09e2f2432b27d7f0b7b249ff01cbaa7aae09d92 Mon Sep 17 00:00:00 2001 From: hummypkg Date: Sun, 21 Feb 2016 23:59:57 +0000 Subject: [PATCH] switch to flash smartctl git-svn-id: file:///root/webif/svn/pkg/webif/trunk@2691 2a923420-c742-0410-a762-8d5b09965624 --- CONTROL/control | 2 +- webif/html/diag/disk.jim | 8 ++++---- webif/lib/bin/diskattrs | 6 +++--- webif/lib/system.class | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/CONTROL/control b/CONTROL/control index 0a89c58..51f4081 100644 --- a/CONTROL/control +++ b/CONTROL/control @@ -1,7 +1,7 @@ Package: webif Priority: optional Section: web -Version: 1.2.8-6 +Version: 1.2.8-7 Architecture: mipsel Maintainer: af123@hummypkg.org.uk Depends: tcpfix,webif-channelicons(>=1.1.20),lighttpd(>=1.4.39-1),jim(>=0.76),jim-oo,jim-sqlite3(>=0.76),jim-cgi(>=0.7),jim-binary(>=0.76),service-control(>=2.1),busybox(>=1.20.2-1),lsof(>=4.87),epg(>=1.2.1),hmt(>=2.0.9),ssmtp,anacron,trm(>=1.1),openssl-command,nicesplice,id3v2,file,rsvsync(>=1.0.2),webif-charts(>=1.2-1),stripts(>=1.2.5-3),tmenu(>=1.08),ffmpeg,id3v2,multienv(>=1.6),tcpping(>=1.1),e2fsprogs,wireless-tools(>=29-1),dbupdate,recmon(>=2.0.7) diff --git a/webif/html/diag/disk.jim b/webif/html/diag/disk.jim index 4740bcf..a798359 100755 --- a/webif/html/diag/disk.jim +++ b/webif/html/diag/disk.jim @@ -13,7 +13,7 @@ set settings [settings] set smart Unknown set line "" # smartctl uses non-zero exit status to indicate health hence catch. -catch { set line [exec /mod/bin/smartctl -H $device | sed -n 5p] } msg +catch { set line [exec /bin/smartctl -H $device | sed -n 5p] } msg if {$msg ne "" && $line eq ""} { set line $msg } if {$line ne ""} { set smart [string range [lindex [split $line :] 1] 1 end] @@ -30,7 +30,7 @@ puts " " -foreach line [split [exec /mod/bin/smartctl -i $device] "\n"] { +foreach line [split [exec /bin/smartctl -i $device] "\n"] { if {[string match "*Not in smartctl database*" $line]} continue if {[string match "*: *" $line]} { regsub -all -- {[[:space:]]+} $line " " line @@ -96,7 +96,7 @@ set nolife {184 187 188 189 191 197 198} set derive {4 "" 5 sectors 9 hours 12 cycles 192 "" 193 "cycles"} set i 0 -foreach line [split [exec /mod/bin/smartctl -A $device] "\n"] { +foreach line [split [exec /bin/smartctl -A $device] "\n"] { regsub -all -- {[[:space:]]+} $line " " line regsub -all -- {^[[:space:]]+} $line "" line if {[incr i] < 8} continue @@ -180,7 +180,7 @@ puts { } -if {[catch {set msg [exec /mod/bin/smartctl -l selftest $device]} xmsg]} { +if {[catch {set msg [exec /bin/smartctl -l selftest $device]} xmsg]} { set msg $xmsg } diff --git a/webif/lib/bin/diskattrs b/webif/lib/bin/diskattrs index d45bf6b..a8b48be 100755 --- a/webif/lib/bin/diskattrs +++ b/webif/lib/bin/diskattrs @@ -12,7 +12,7 @@ set settings [settings] set smart "" set line "" # smartctl uses non-zero exit status to indicate health hence catch. -catch { set line [exec /mod/bin/smartctl -H $disk | sed -n 5p] } msg +catch { set line [exec /bin/smartctl -H $disk | sed -n 5p] } msg if {$msg ne "" && $line eq ""} { set line $msg } if {$line ne ""} { set smart [string range [lindex [split $line :] 1] 1 end] @@ -20,7 +20,7 @@ if {$line ne ""} { } # Extract disk model. -foreach line [split [exec /mod/bin/smartctl -i $disk] "\n"] { +foreach line [split [exec /bin/smartctl -i $disk] "\n"] { if {[string match "*Not in smartctl database*" $line]} continue if {[string match "*: *" $line]} { regsub -all -- {[[:space:]]+} $line " " line @@ -31,7 +31,7 @@ foreach line [split [exec /mod/bin/smartctl -i $disk] "\n"] { } # Extract disk attributes. -foreach line [split [exec /mod/bin/smartctl -A -f brief $disk] "\n"] { +foreach line [split [exec /bin/smartctl -A -f brief $disk] "\n"] { regsub -all -- {[[:space:]]+} $line " " line regsub -all -- {^[[:space:]]+} $line "" line lassign [split $line] id name flags val worst thresh when rval diff --git a/webif/lib/system.class b/webif/lib/system.class index d68e55d..ebac1c8 100644 --- a/webif/lib/system.class +++ b/webif/lib/system.class @@ -318,7 +318,7 @@ proc {system disk} {} { proc {system disktemp} {} { if {[catch { - set smart [exec /mod/bin/smartctl -A [system disk] | grep ^194] + set smart [exec /bin/smartctl -A [system disk] | grep ^194] regsub -all -- {[[:space:]]+} $smart " " smart set temp [lindex [split $smart] 9] }]} {
SMART Status$smart