Add "system isrestartpending"
This commit is contained in:
parent
aa24f100fa
commit
30a006b971
|
@ -1,9 +1,10 @@
|
||||||
#!/mod/bin/jimsh
|
#!/mod/bin/jimsh
|
||||||
|
|
||||||
|
source /mod/webif/lib/setup
|
||||||
|
require system.class
|
||||||
set class "class=hidden"
|
set class "class=hidden"
|
||||||
if {[file exists /tmp/.restartpending]} {
|
if {[system isrestartpending]} {
|
||||||
source /mod/webif/lib/setup
|
require rsv.class
|
||||||
require system.class rsv.class
|
|
||||||
if {[rsv count pending] <= 0} {
|
if {[rsv count pending] <= 0} {
|
||||||
system restartpending 0
|
system restartpending 0
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -554,6 +554,10 @@ proc {system reboot} {{fast 0}} {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
proc {system isrestartpending} {} {
|
||||||
|
return [file exists /tmp/.restartpending]
|
||||||
|
}
|
||||||
|
|
||||||
proc {system restartpending} {{mode 1}} {
|
proc {system restartpending} {{mode 1}} {
|
||||||
if {$mode} {
|
if {$mode} {
|
||||||
close [open /tmp/.restartpending w]
|
close [open /tmp/.restartpending w]
|
||||||
|
|
Loading…
Reference in New Issue