From 4b4ac8dfbf743cc8b60ec68f44c6c98a69738332 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 18 Jan 2018 18:13:16 -0400 Subject: propellor spin --- src/Propellor/Property/FlashKernel.hs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/Propellor/Property/FlashKernel.hs b/src/Propellor/Property/FlashKernel.hs index 3f65f872..1a52621d 100644 --- a/src/Propellor/Property/FlashKernel.hs +++ b/src/Propellor/Property/FlashKernel.hs @@ -23,10 +23,15 @@ installed :: Machine -> Property (HasInfo + DebianLike) installed machine = setInfoProperty go (toInfo [FlashKernelInstalled]) where go = "/etc/flash-kernel/machine" `File.hasContent` [machine] - `onChange` (cmdProperty "flash-kernel" [] `assume` MadeChange) + `onChange` flashKernel `requires` File.dirExists "/etc/flash-kernel" `requires` Apt.installed ["flash-kernel"] +-- | Runs flash-kernel with whatever machine `installed` configured. +flashKernel :: Property DebianLike +flashKernel = tightenTargets $ + cmdProperty "flash-kernel" [] `assume` MadeChange + -- | Runs flash-kernel in the system mounted at a particular directory. flashKernelMounted :: FilePath -> Property Linux flashKernelMounted mnt = combineProperties desc $ props -- cgit v1.2.3