summaryrefslogtreecommitdiff
path: root/src/Propellor/Property/FlashKernel.hs
diff options
context:
space:
mode:
authorJoey Hess2018-01-18 18:13:16 -0400
committerJoey Hess2018-01-18 18:13:16 -0400
commit4b4ac8dfbf743cc8b60ec68f44c6c98a69738332 (patch)
tree985cc0127ec7fe6cd12cec4735182b6dd1f4a6e6 /src/Propellor/Property/FlashKernel.hs
parentee1fa567e5d805f47198260dfed402ff0c4fed6c (diff)
propellor spin
Diffstat (limited to 'src/Propellor/Property/FlashKernel.hs')
-rw-r--r--src/Propellor/Property/FlashKernel.hs7
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