summaryrefslogtreecommitdiff
path: root/src/Propellor/Property/SiteSpecific/JoeySites.hs
diff options
context:
space:
mode:
authorJoey Hess2018-09-09 16:39:43 -0400
committerJoey Hess2018-09-09 16:39:43 -0400
commitc4788cac17c3f4fc4dbae2a351cfaf3b1b3f15c9 (patch)
tree21da808e33d298e954dd8148651cf503ff8356f4 /src/Propellor/Property/SiteSpecific/JoeySites.hs
parentfe584a7ee1f316c4fdef3988d50138cae693b674 (diff)
propellor spin
Diffstat (limited to 'src/Propellor/Property/SiteSpecific/JoeySites.hs')
-rw-r--r--src/Propellor/Property/SiteSpecific/JoeySites.hs13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/Propellor/Property/SiteSpecific/JoeySites.hs b/src/Propellor/Property/SiteSpecific/JoeySites.hs
index e3f672b7..a77a6be5 100644
--- a/src/Propellor/Property/SiteSpecific/JoeySites.hs
+++ b/src/Propellor/Property/SiteSpecific/JoeySites.hs
@@ -1182,17 +1182,20 @@ devSoftware = Apt.installed
]
cubieTruckOneWire :: Property DebianLike
-cubieTruckOneWire = dtsinstalled
- `onChange` utilitysetup
+cubieTruckOneWire = utilitysetup
+ `requires` dtsinstalled
`requires` utilityinstalled
where
dtsinstalled = File.hasContent "/etc/easy-peasy-devicetree-squeezy/my.dts" mydts
`requires` File.dirExists "/etc/easy-peasy-devicetree-squeezy"
utilityinstalled = Git.cloned (User "root") "https://git.joeyh.name/git/easy-peasy-devicetree-squeezy.git" "/usr/local/easy-peasy-devicetree-squeezy" Nothing
`onChange` File.isSymlinkedTo "/usr/local/bin/easy-peasy-devicetree-squeezy" (File.LinkTarget "/usr/local/easy-peasy-devicetree-squeezy/easy-peasy-devicetree-squeezy")
- utilitysetup = cmdProperty "easy-peasy-devicetree-squeezy"
- ["--debian", "sun7i-a20-cubietruck"]
- `assume` MadeChange
+ `requires` Apt.installed ["pv", "device-tree-compiler", "cpp", "linux-source"]
+ utilitysetup = check (not <$> doesFileExist dtb) $
+ cmdProperty "easy-peasy-devicetree-squeezy"
+ ["--debian", "sun7i-a20-cubietruck"]
+ `assume` MadeChange
+ dtb = "/etc/flash-kernel/dtbs/sun7i-a20-cubietruck.dtb"
mydts =
[ "/* Device tree addition enabling onewire sensors on CubieTruck GPIO pin PC21 */"
, "#include <dt-bindings/gpio/gpio.h>"