diff options
| author | Joey Hess <joeyh@joeyh.name> | 2016-04-05 13:46:03 -0400 |
|---|---|---|
| committer | Joey Hess <joeyh@joeyh.name> | 2016-04-05 13:46:03 -0400 |
| commit | 74f8e2ad26c5c069fdafdc5e3ed32ec0a57b57ba (patch) | |
| tree | a26c3fee876009c1e7e1904ddced4ed98794fc85 /src | |
| parent | e41e55edf4857247219ffb28b609ca18ab5f196d (diff) | |
| parent | 6512717f2e0e9d58b89501ba2e08c117a0486e9e (diff) | |
Merge remote-tracking branch 'felix/apt-periodic-updates'
Diffstat (limited to 'src')
| -rw-r--r-- | src/Propellor/Property/Apt.hs | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/Propellor/Property/Apt.hs b/src/Propellor/Property/Apt.hs index 5771750d..fd70e37d 100644 --- a/src/Propellor/Property/Apt.hs +++ b/src/Propellor/Property/Apt.hs @@ -258,6 +258,15 @@ unattendedUpgrades = enable <!> disable ("Unattended-Upgrade::Origins-Pattern { \"o=Debian,a="++showSuite suite++"\"; };") _ -> noChange +-- | Enable periodic updates. +periodicUpdates :: Property DebianLike +periodicUpdates = tightenTargets $ "/etc/apt/apt.conf.d/02periodic" `File.hasContent` + [ "APT::Periodic::Enable \"1\";" + , "APT::Periodic::Update-Package-Lists \"1\";" + , "APT::Periodic::Download-Upgradeable-Packages \"1\";" + , "APT::Periodic::Verbose \"1\";" + ] + type DebconfTemplate = String type DebconfTemplateType = String type DebconfTemplateValue = String @@ -265,8 +274,8 @@ type DebconfTemplateValue = String -- | Preseeds debconf values and reconfigures the package so it takes -- effect. reConfigure :: Package -> [(DebconfTemplate, DebconfTemplateType, DebconfTemplateValue)] -> Property DebianLike -reConfigure package vals = tightenTargets $ - reconfigure +reConfigure package vals = tightenTargets $ + reconfigure `requires` setselections `describe` ("reconfigure " ++ package) where |
