diff options
| author | Joey Hess <joey@kitenet.net> | 2014-04-19 15:51:01 -0400 |
|---|---|---|
| committer | Joey Hess <joey@kitenet.net> | 2014-04-19 15:51:01 -0400 |
| commit | 494f5d3bef9a8f401ad472ce55ee96e48f8012c3 (patch) | |
| tree | 6d104ef93b5a485b7b10a96dcd08e37b4915b001 /Propellor | |
| parent | 861cb5a61da667cc4804a5810dae3da4da0b6ce7 (diff) | |
| parent | 82d563a6a0f052f1f3fc249c7ee1aa5dee444e37 (diff) | |
Merge branch 'joeyconfig'
Diffstat (limited to 'Propellor')
| -rw-r--r-- | Propellor/Property/Apt.hs | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/Propellor/Property/Apt.hs b/Propellor/Property/Apt.hs index 9234cbbf..7329c7a8 100644 --- a/Propellor/Property/Apt.hs +++ b/Propellor/Property/Apt.hs @@ -192,7 +192,9 @@ autoRemove = runApt ["-y", "autoremove"] unattendedUpgrades :: RevertableProperty unattendedUpgrades = RevertableProperty enable disable where - enable = setup True `before` Service.running "cron" + enable = setup True + `before` Service.running "cron" + `before` configure disable = setup False setup enabled = (if enabled then installed else removed) ["unattended-upgrades"] @@ -203,6 +205,16 @@ unattendedUpgrades = RevertableProperty enable disable v | enabled = "true" | otherwise = "false" + + configure = withOS "unattended upgrades configured" $ \o -> + case o of + -- the package defaults to only upgrading stable + (Just (System (Debian suite) _)) + | not (isStable suite) -> ensureProperty $ + "/etc/apt/apt.conf.d/50unattended-upgrades" + `File.containsLine` + ("\t\"o=Debian,a="++showSuite suite++"\";") + _ -> noChange -- | Preseeds debconf values and reconfigures the package so it takes -- effect. |
