2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-09-21 08:33:20 +00:00

Merge pull request #7675 from VersatusHPC/harvest/reboot-systemd-timer-suse

fix(postscripts): schedule the reboot with a systemd timer on SUSE
This commit is contained in:
Daniel Hilst
2026-07-27 11:21:49 -03:00
committed by GitHub
+8 -1
View File
@@ -3,7 +3,14 @@
#(C)IBM Corp
#
(sleep 75;/sbin/reboot) &
# On SUSE the backgrounded "sleep then reboot" can fire while the installer is
# still finishing and reboot the node mid-install. Schedule the reboot with a
# systemd timer there instead, which the installer teardown does not race.
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 /sbin/reboot
else
(sleep 75;/sbin/reboot) &
fi
exit 0