summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJoey Hess2015-08-12 17:00:03 -0400
committerJoey Hess2015-08-12 17:00:03 -0400
commit4cab90c13713025a66c4aec7074730faa2e2b4ed (patch)
tree9a0b4bfb04ceb1d56e7f43f8252132266a098c1c /src
parentb64a91db5767e2afcd53f496ba303ada8e3fdcc1 (diff)
propellor spin
Diffstat (limited to 'src')
-rw-r--r--src/Propellor/Property/Network.hs9
-rw-r--r--src/Propellor/Property/SiteSpecific/GitAnnexBuilder.hs5
-rw-r--r--src/Propellor/Property/SiteSpecific/IABak.hs1
3 files changed, 12 insertions, 3 deletions
diff --git a/src/Propellor/Property/Network.hs b/src/Propellor/Property/Network.hs
index 4d7ccffb..e01edb62 100644
--- a/src/Propellor/Property/Network.hs
+++ b/src/Propellor/Property/Network.hs
@@ -27,6 +27,15 @@ cleanInterfacesFile = hasContent interfacesFile
]
`describe` ("clean " ++ interfacesFile)
+-- | Configures an interface to get its address via dhcp.
+dhcp :: Interface -> Property NoInfo
+dhcp iface = hasContent (interfaceDFile iface)
+ [ "auto " ++ iface
+ , "iface " ++ iface ++ " inet dhcp"
+ ]
+ `describe` ("dhcp " ++ iface)
+ `requires` interfacesDEnabled
+
-- | Writes a static interface file for the specified interface.
--
-- The interface has to be up already. It could have been brought up by
diff --git a/src/Propellor/Property/SiteSpecific/GitAnnexBuilder.hs b/src/Propellor/Property/SiteSpecific/GitAnnexBuilder.hs
index 5ccd9996..6a6d5bfd 100644
--- a/src/Propellor/Property/SiteSpecific/GitAnnexBuilder.hs
+++ b/src/Propellor/Property/SiteSpecific/GitAnnexBuilder.hs
@@ -115,8 +115,8 @@ standardAutoBuilder osver@(System _ arch) =
& User.accountFor (User builduser)
& tree arch
-armAutoBuilder :: System -> Times -> TimeOut -> Property HasInfo
-armAutoBuilder osver@(System _ arch) crontime timeout =
+armAutoBuilder :: System -> Property HasInfo
+armAutoBuilder osver =
propertyList "arm git-annex autobuilder" $ props
& standardAutoBuilder osver
& buildDepsNoHaskellLibs
@@ -126,7 +126,6 @@ armAutoBuilder osver@(System _ arch) crontime timeout =
-- Install patched haskell packages for portability to
-- arm NAS's using old kernel versions.
& haskellPkgsInstalled "linux"
- & autobuilder arch crontime timeout
androidAutoBuilderContainer :: Times -> TimeOut -> Systemd.Container
androidAutoBuilderContainer crontimes timeout =
diff --git a/src/Propellor/Property/SiteSpecific/IABak.hs b/src/Propellor/Property/SiteSpecific/IABak.hs
index 7740f820..8c9926bc 100644
--- a/src/Propellor/Property/SiteSpecific/IABak.hs
+++ b/src/Propellor/Property/SiteSpecific/IABak.hs
@@ -36,6 +36,7 @@ gitServer knownhosts = propertyList "iabak git server" $ props
"/usr/local/IA.BAK/shardstats-all"
& Cron.niceJob "shardmaint" Cron.Daily (User "root") "/"
"/usr/local/IA.BAK/shardmaint-fast; /usr/local/IA.BAK/shardmaint"
+ & Apt.installed ["git-annex"]
registrationServer :: [Host] -> Property HasInfo
registrationServer knownhosts = propertyList "iabak registration server" $ props