delay reboot, use abs path for df

This commit is contained in:
Jan Schneider 2017-03-27 22:40:43 +02:00
parent 2998619e1b
commit 0659f70d64
1 changed files with 2 additions and 2 deletions

View File

@ -118,7 +118,7 @@ proc ::rmupdate::umount {device_or_mountpoint} {
}
proc ::rmupdate::get_filesystem_size_and_usage {device_or_mountpoint} {
set data [exec df]
set data [exec /bin/df]
foreach d [split $data "\n"] {
regexp {^(\S+)\s+\d+\s+(\d+)\s+(\d+)\s+\d+%\s(\S+)\s*$} $d match device used available mountpoint
if { [info exists device] } {
@ -387,7 +387,7 @@ proc ::rmupdate::install_firmware_version {version {reboot 1}} {
if {$reboot} {
write_log "Rebooting system."
exec /sbin/reboot -f
exec /bin/sh -c "/bin/sleep 5; /sbin/reboot -f" &
}
}