keep and use Reboot.now

This commit is contained in:
Joey Hess 2014-12-06 13:32:53 -04:00
parent de02fa9f7b
commit bdbf787e2c
2 changed files with 7 additions and 3 deletions

View File

@ -5,6 +5,7 @@ module Propellor.Property.HostingProvider.DigitalOcean (
import Propellor import Propellor
import qualified Propellor.Property.Apt as Apt import qualified Propellor.Property.Apt as Apt
import qualified Propellor.Property.File as File import qualified Propellor.Property.File as File
import qualified Propellor.Property.Reboot as Reboot
import Data.List import Data.List
@ -24,9 +25,8 @@ distroKernel = propertyList "digital ocean distro kernel hack"
[ "LOAD_KEXEC=true" [ "LOAD_KEXEC=true"
, "USE_GRUB_CONFIG=true" , "USE_GRUB_CONFIG=true"
] `describe` "kexec configured" ] `describe` "kexec configured"
, check (not <$> runningInstalledKernel) , check (not <$> runningInstalledKernel) Reboot.now
(cmdProperty "reboot" []) `describe` "running installed kernel"
`describe` "running installed kernel"
] ]
runningInstalledKernel :: IO Bool runningInstalledKernel :: IO Bool

View File

@ -3,6 +3,10 @@ module Propellor.Property.Reboot where
import Propellor import Propellor
import Utility.SafeCommand import Utility.SafeCommand
now :: Property
now = cmdProperty "reboot" []
`describe` "reboot now"
-- | Schedules a reboot at the end of the current propellor run. -- | Schedules a reboot at the end of the current propellor run.
-- --
-- The Result code of the endire propellor run can be checked; -- The Result code of the endire propellor run can be checked;