summaryrefslogtreecommitdiff
path: root/global/post-tasks.d/999reboot
diff options
context:
space:
mode:
authorStefan Wold <swold@sunet.se>2014-02-24 09:55:34 +0100
committerStefan Wold <swold@sunet.se>2014-02-24 09:55:34 +0100
commit0f44e1679c66a0aa223c8ac1d3f3e88d9934cc84 (patch)
tree112f5ace6ed87e8c110a9ad08a70facd5a7774eb /global/post-tasks.d/999reboot
parent31772848b3dfcf53971ae1a98020e1ff8875aa90 (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-xglobal/post-tasks.d/999reboot4
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