]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
aws: Execute reboot when an update requires one
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 15 Aug 2018 10:45:27 +0000 (11:45 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 15 Aug 2018 10:51:53 +0000 (11:51 +0100)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/initscripts/helper/aws-setup

index fbf63a1ab0e5ff673f46dc808cdc1650f930f0ab..3dbdfe3fc6119154fe1cc4a9bfdf7fc2385c9270 100644 (file)
@@ -120,6 +120,12 @@ import_aws_configuration() {
                # Install all available updates
                pakfire update && pakfire upgrade -y
 
+               # If an update requires a reboot, we will do it
+               if [ -e "/var/run/need_reboot" ]; then
+                       reboot
+                       exit 1
+               fi
+
                # Download user-data
                local user_data="$(get user-data)"