1
0
mirror of https://github.com/rancher/os.git synced 2025-08-28 11:12:59 +00:00

Fixes the following scenario can not reboot (#2236)

1. use ros install
2. use ros os upgrade
This commit is contained in:
niusmallnan 2018-01-25 16:25:09 +08:00 committed by GitHub
parent 82aaa413f5
commit 1c2e55ed17
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

View File

@ -39,6 +39,7 @@ func runDocker(name string) error {
}
cmd := os.Args
log.Debugf("runDocker cmd: %s", cmd)
if name == "" {
name = filepath.Base(os.Args[0])

View File

@ -190,6 +190,7 @@ func Kexec(previous bool, bootDir, append string) error {
// Reboot is used by installation / upgrade
// TODO: add kexec option
func Reboot() {
os.Args = []string{"reboot"}
reboot("reboot", false, syscall.LINUX_REBOOT_CMD_RESTART)
}