[why] my-qemu.sh can't exit after job done, because archlinux don't use 'reboot' command to reboot, it use 'systemctl reboot' to reboot
[how] judge os, use 'systemctl reboot' command when ${os} is archlinux
Signed-off-by: Wang Yong wangyong0117@qq.com --- lib/reboot.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/lib/reboot.sh b/lib/reboot.sh index 8557c5972..afe511ca1 100644 --- a/lib/reboot.sh +++ b/lib/reboot.sh @@ -2,5 +2,9 @@
reboot_tbox() { - reboot + if [ "${os}" = "archlinux" ]; then + systemctl reboot + else + reboot + fi }