diff options
| author | Joey Hess <id@joeyh.name> | 2014-12-06 13:32:53 -0400 |
|---|---|---|
| committer | Joey Hess <id@joeyh.name> | 2014-12-06 13:32:53 -0400 |
| commit | bdbf787e2cf1123429491da5f06f46a8dc8774f6 (patch) | |
| tree | a8f89b7f3c5406bc118ff14057fe86e4cc2145d1 /src | |
| parent | de02fa9f7b25d6b5dc27b0af3dd91a40f0c80fca (diff) | |
keep and use Reboot.now
Diffstat (limited to 'src')
| -rw-r--r-- | src/Propellor/Property/HostingProvider/DigitalOcean.hs | 6 | ||||
| -rw-r--r-- | src/Propellor/Property/Reboot.hs | 4 |
2 files changed, 7 insertions, 3 deletions
diff --git a/src/Propellor/Property/HostingProvider/DigitalOcean.hs b/src/Propellor/Property/HostingProvider/DigitalOcean.hs index 32165d48..4d2534ec 100644 --- a/src/Propellor/Property/HostingProvider/DigitalOcean.hs +++ b/src/Propellor/Property/HostingProvider/DigitalOcean.hs @@ -5,6 +5,7 @@ module Propellor.Property.HostingProvider.DigitalOcean ( import Propellor import qualified Propellor.Property.Apt as Apt import qualified Propellor.Property.File as File +import qualified Propellor.Property.Reboot as Reboot import Data.List @@ -24,9 +25,8 @@ distroKernel = propertyList "digital ocean distro kernel hack" [ "LOAD_KEXEC=true" , "USE_GRUB_CONFIG=true" ] `describe` "kexec configured" - , check (not <$> runningInstalledKernel) - (cmdProperty "reboot" []) - `describe` "running installed kernel" + , check (not <$> runningInstalledKernel) Reboot.now + `describe` "running installed kernel" ] runningInstalledKernel :: IO Bool diff --git a/src/Propellor/Property/Reboot.hs b/src/Propellor/Property/Reboot.hs index 3a725838..c2628689 100644 --- a/src/Propellor/Property/Reboot.hs +++ b/src/Propellor/Property/Reboot.hs @@ -3,6 +3,10 @@ module Propellor.Property.Reboot where import Propellor import Utility.SafeCommand +now :: Property +now = cmdProperty "reboot" [] + `describe` "reboot now" + -- | Schedules a reboot at the end of the current propellor run. -- -- The Result code of the endire propellor run can be checked; |
