summaryrefslogtreecommitdiff
path: root/src/Propellor/Property/FlashKernel.hs
diff options
context:
space:
mode:
authorJoey Hess2018-02-01 12:27:26 -0400
committerJoey Hess2018-02-01 12:27:26 -0400
commite80ac83657169b973fd8fe25deb42f458da475b9 (patch)
tree885f8e981c9ff941ab959cdcc804a90c53c38509 /src/Propellor/Property/FlashKernel.hs
parent81d288629d82e1fa81bb004a74ef9480b3a544a0 (diff)
parent5cd0291025b92ee2e408abd73b2cb4225f22465d (diff)
Merge branch 'joeyconfig'
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