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:
parent
82aaa413f5
commit
1c2e55ed17
@ -39,6 +39,7 @@ func runDocker(name string) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
cmd := os.Args
|
cmd := os.Args
|
||||||
|
log.Debugf("runDocker cmd: %s", cmd)
|
||||||
|
|
||||||
if name == "" {
|
if name == "" {
|
||||||
name = filepath.Base(os.Args[0])
|
name = filepath.Base(os.Args[0])
|
||||||
|
@ -190,6 +190,7 @@ func Kexec(previous bool, bootDir, append string) error {
|
|||||||
// Reboot is used by installation / upgrade
|
// Reboot is used by installation / upgrade
|
||||||
// TODO: add kexec option
|
// TODO: add kexec option
|
||||||
func Reboot() {
|
func Reboot() {
|
||||||
|
os.Args = []string{"reboot"}
|
||||||
reboot("reboot", false, syscall.LINUX_REBOOT_CMD_RESTART)
|
reboot("reboot", false, syscall.LINUX_REBOOT_CMD_RESTART)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user