fix hostname in settings screen

git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@1704 2a923420-c742-0410-a762-8d5b09965624
This commit is contained in:
hummypkg 2013-10-13 15:23:15 +00:00
parent d81037aa5f
commit 4fc05273e1
3 changed files with 5 additions and 5 deletions

View File

@ -1,7 +1,7 @@
Package: webif
Priority: optional
Section: web
Version: 1.0.7
Version: 1.0.7-2
Architecture: mipsel
Maintainer: af123@hummypkg.org.uk
Depends: webif-channelicons(>=1.1.4),mongoose(>=3.0-9),jim(>=0.73-1),jim-oo,jim-sqlite3(>=0.73-1),jim-cgi(>=0.7),jim-binary,service-control(>=1.2),busybox(>=1.20.2-1),lsof,epg(>=1.0.13),hmt(>=1.1.14),ssmtp,anacron,trm(>=1.1),openssl-command,nicesplice,id3v2,file,rsvsync(>=1.0.2),webif-charts(>=1.2),stripts(>=1.2.3),smartmontools,tmenu(>=1.05),ffmpeg,id3v2,multienv(>=1.6)

View File

@ -9,7 +9,7 @@ set settings [settings]
foreach attr {realloc pending offline} {
set val [$settings _nval_setting "SMART_$attr"]
if {$val <= 0} continue
if {$val < 0} continue
$settings _nval_setting "SMART_ack_$attr" $val
}

View File

@ -35,7 +35,7 @@ class settings {
settings method hostname {{name ""}} {
if {$name == ""} {
# Get
if {[catch {set fd [open "/var/lib/humaxtv/hostname" r]}]} {
if {[catch {set fd [open "/var/lib/humaxtv/mod/hostname" r]}]} {
set name "humax"
} else {
set name [string trim [read $fd]]
@ -45,10 +45,10 @@ settings method hostname {{name ""}} {
} else {
# Set
if [string is alnum -strict $name] {
set fd [open "/var/lib/humaxtv/hostname" w]
set fd [open "/var/lib/humaxtv/mod/hostname" w]
puts $fd $name
close $fd
exec hostname -F /var/lib/humaxtv/hostname
exec hostname -F /var/lib/humaxtv/mod/hostname
}
}
}