From 0f44e1679c66a0aa223c8ac1d3f3e88d9934cc84 Mon Sep 17 00:00:00 2001 From: Stefan Wold Date: Mon, 24 Feb 2014 09:55:34 +0100 Subject: 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. --- global/post-tasks.d/999reboot | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 -- cgit v1.1