diff options
author | Theodore Ts'o <tytso@mit.edu> | 2023-07-06 00:11:01 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2023-07-06 00:18:16 -0400 |
commit | b7c348b96566555149a36809b84965b333cd8108 (patch) | |
tree | f3a969e317762dc30aaf9a2ba5a27c83762a6c58 | |
parent | 9c911e52edb4cb96adab0c78482e6f54fe804647 (diff) | |
download | xfstests-bld-b7c348b96566555149a36809b84965b333cd8108.tar.gz |
test-appliances: allow for an asynchronous reboot command
Systemd's reboot command is not instaneous and will return after
requesting systemd to reboot. This can take a second or two, during
which the gce-load-kernel script will continue executing commands
intended for the kexec option.
Fix this by sleeping for a minute after the reboot command, and if the
system is still running force an immediate reboot using "reboot -f"
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
-rwxr-xr-x | test-appliance/files/usr/local/lib/gce-load-kernel | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test-appliance/files/usr/local/lib/gce-load-kernel b/test-appliance/files/usr/local/lib/gce-load-kernel index 01737639..e3bbbbc6 100755 --- a/test-appliance/files/usr/local/lib/gce-load-kernel +++ b/test-appliance/files/usr/local/lib/gce-load-kernel @@ -169,6 +169,10 @@ EOF grub-reboot "1>$menunum" echo "Rebooting..." reboot + sleep 60 + echo "Forcing reboot after 60 seconds..." + reboot -f + sleep 60 fi if ! test -f /root/bzImage |