summaryrefslogtreecommitdiff
path: root/src/Propellor/Property/Attic.hs
diff options
context:
space:
mode:
authorFélix Sipma2016-04-23 20:43:17 +0200
committerFélix Sipma2016-04-23 20:43:17 +0200
commitf70e58b707a93f2977fbba6b98d89441e0ea3b31 (patch)
tree93e06bfde379042deb968b27d72545b82832077c /src/Propellor/Property/Attic.hs
parent3679e2bb4054345288c6da24ea9b4627b16bbaf9 (diff)
Attic: do not run prune if no KeepPolicy is specified
Diffstat (limited to 'src/Propellor/Property/Attic.hs')
-rw-r--r--src/Propellor/Property/Attic.hs7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/Propellor/Property/Attic.hs b/src/Propellor/Property/Attic.hs
index 0fadc113..9fc79abd 100644
--- a/src/Propellor/Property/Attic.hs
+++ b/src/Propellor/Property/Attic.hs
@@ -52,10 +52,9 @@ backup dirs backupdir crontimes extraargs kp = propertyList (backupdir ++ " atti
& Cron.niceJob ("attic_backup" ++ backupdir) crontimes (User "root") "/" backupcmd
`requires` installed
where
- backupcmd = intercalate ";"
- [ createCommand
- , pruneCommand
- ]
+ backupcmd = intercalate ";" $
+ createCommand
+ : if null kp then [] else [pruneCommand]
createCommand = unwords $
[ "attic"
, "create"