mirror of
https://github.com/Telecominfraproject/ols-ucentral-schema.git
synced 2025-11-02 02:57:55 +00:00
command: add dying gasp to upgrade script
Signed-off-by: John Crispin <john@phrozen.org>
This commit is contained in:
@@ -65,18 +65,12 @@
|
||||
return;
|
||||
}
|
||||
|
||||
let sysupgrade_cmdline = [
|
||||
'sysupgrade',
|
||||
...(args.keep_redirector ? [ '-f', '/tmp/sysupgrade.tgz' ] : [ '-n' ]),
|
||||
image_path
|
||||
];
|
||||
let sysupgrade_cmdline = sprintf("sysupgrade %s %s",
|
||||
args.keep_redirector ? "-f /tmp/sysupgrade.tgz" : "-n",
|
||||
image_path);
|
||||
|
||||
warn("Upgrading firmware\n");
|
||||
|
||||
system(['/etc/init.d/network', 'stop']);
|
||||
|
||||
rc = system(sysupgrade_cmdline);
|
||||
|
||||
if (rc != 0)
|
||||
result(2, "System upgrade command %s exited with non-zero code %d", sysupgrade_cmdline, rc);
|
||||
system("(sleep 10; /etc/init.d/network stop; " + sysupgrade_cmdline + ")&");
|
||||
system("/etc/init.d/ucentral stop");
|
||||
%}
|
||||
|
||||
Reference in New Issue
Block a user