switch to flash smartctl

git-svn-id: file:///root/webif/svn/pkg/webif/trunk@2691 2a923420-c742-0410-a762-8d5b09965624
This commit is contained in:
hummypkg 2016-02-21 23:59:57 +00:00
parent 055458ed46
commit d09e2f2432
4 changed files with 9 additions and 9 deletions

View File

@ -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)

View File

@ -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 "
<table>
<tr><th class=key>SMART Status</th><td>$smart<td></tr>
"
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 {
</tr>
}
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
}

View File

@ -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

View File

@ -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]
}]} {