diff options
author | Stefan Wold <swold@sunet.se> | 2014-02-24 09:55:34 +0100 |
---|---|---|
committer | Stefan Wold <swold@sunet.se> | 2014-02-24 09:55:34 +0100 |
commit | 0f44e1679c66a0aa223c8ac1d3f3e88d9934cc84 (patch) | |
tree | 112f5ace6ed87e8c110a9ad08a70facd5a7774eb /global/post-tasks.d/999reboot | |
parent | 31772848b3dfcf53971ae1a98020e1ff8875aa90 (diff) |
Opt-in for automatic reboot
Use of && is bad in this context since it will return 1 causing
cosmos to exit with status 1 if a reboot is not required.
Diffstat (limited to 'global/post-tasks.d/999reboot')
-rwxr-xr-x | global/post-tasks.d/999reboot | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/global/post-tasks.d/999reboot b/global/post-tasks.d/999reboot index 5331446..2ed9fa7 100755 --- a/global/post-tasks.d/999reboot +++ b/global/post-tasks.d/999reboot @@ -1,3 +1,5 @@ #!/bin/sh -test -f /var/run/reboot-required -a ! -f /etc/cosmos-manual-reboot && reboot +if [ -f /var/run/reboot-required -a -f /etc/cosmos-automatic-reboot ]; then + reboot +fi |