diff options
| author | Félix Sipma <felix.sipma@no-log.org> | 2016-04-23 20:43:17 +0200 |
|---|---|---|
| committer | Félix Sipma <felix.sipma@no-log.org> | 2016-04-23 20:43:17 +0200 |
| commit | f70e58b707a93f2977fbba6b98d89441e0ea3b31 (patch) | |
| tree | 93e06bfde379042deb968b27d72545b82832077c /src | |
| parent | 3679e2bb4054345288c6da24ea9b4627b16bbaf9 (diff) | |
Attic: do not run prune if no KeepPolicy is specified
Diffstat (limited to 'src')
| -rw-r--r-- | src/Propellor/Property/Attic.hs | 7 |
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" |
