From f70e58b707a93f2977fbba6b98d89441e0ea3b31 Mon Sep 17 00:00:00 2001 From: FĂ©lix Sipma Date: Sat, 23 Apr 2016 20:43:17 +0200 Subject: Attic: do not run prune if no KeepPolicy is specified --- src/Propellor/Property/Attic.hs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/Propellor/Property/Attic.hs') 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" -- cgit v1.2.3