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