diff options
Diffstat (limited to 'src/Propellor/Property')
| -rw-r--r-- | src/Propellor/Property/FlashKernel.hs | 7 |
1 files changed, 6 insertions, 1 deletions
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 |
