Merge pull request #673 from feckert/bugfix_sleep_sysupgrade

luci-mod-admin-full: add sleep before sysupgrade
This commit is contained in:
Jo-Philipp Wich 2016-03-16 11:46:48 +01:00
commit d710d218c8

View file

@ -276,7 +276,7 @@ function action_flashops()
msg = luci.i18n.translate("The system is flashing now.<br /> DO NOT POWER OFF THE DEVICE!<br /> Wait a few minutes before you try to reconnect. It might be necessary to renew the address of your computer to reach the device again, depending on your settings."), msg = luci.i18n.translate("The system is flashing now.<br /> DO NOT POWER OFF THE DEVICE!<br /> Wait a few minutes before you try to reconnect. It might be necessary to renew the address of your computer to reach the device again, depending on your settings."),
addr = (#keep > 0) and "192.168.1.1" or nil addr = (#keep > 0) and "192.168.1.1" or nil
}) })
fork_exec("killall dropbear uhttpd; sleep 1; /sbin/sysupgrade %s %q" %{ keep, image_tmp }) fork_exec("sleep 1; killall dropbear uhttpd; sleep 1; /sbin/sysupgrade %s %q" %{ keep, image_tmp })
end end
elseif reset_avail and luci.http.formvalue("reset") then elseif reset_avail and luci.http.formvalue("reset") then
-- --