2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-09-04 01:08:18 +00:00

Try to use systemd-run for reboot

This has an improved chance of surviving yast process.
This commit is contained in:
Jarrod Johnson
2019-03-04 10:01:39 -05:00
parent 3432dac84d
commit 4fe2a72cb0

View File

@@ -3,8 +3,8 @@
#(C)IBM Corp
# Lenovo(c) 2019
#
if grep NAME /etc/os-release | egrep '(SLE|SUSE)' > /dev/null; then
(sleep 180;/sbin/reboot) &
if grep NAME /etc/os-release | egrep '(SLE|SUSE)' > /dev/null && [ -x /usr/bin/systemd-run ]; then
systemd-run --on-active=90 --timer-property=AccuracySec=10s reboot
else
(sleep 75;/sbin/reboot) &
fi