summaryrefslogtreecommitdiff
path: root/src/Propellor/Property/Obnam.hs
diff options
context:
space:
mode:
authorJoey Hess2014-11-15 17:02:25 -0400
committerJoey Hess2014-11-15 17:02:30 -0400
commit8d91b5de6b43333ba77974053cdcdfa87409fb62 (patch)
tree61f3ed9063234b6fc93ad6e05de7e1761fd1cbd5 /src/Propellor/Property/Obnam.hs
parent7902f705b0ba9c88e23fbe6023b293b838a56127 (diff)
Convert GpgKeyId to newtype
Diffstat (limited to 'src/Propellor/Property/Obnam.hs')
-rw-r--r--src/Propellor/Property/Obnam.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Propellor/Property/Obnam.hs b/src/Propellor/Property/Obnam.hs
index e18ca3f9..4dc895ef 100644
--- a/src/Propellor/Property/Obnam.hs
+++ b/src/Propellor/Property/Obnam.hs
@@ -48,8 +48,10 @@ backup dir crontimes params numclients =
-- into root's keyring using Propellor.Property.Gpg.keyImported
backupEncrypted :: FilePath -> Cron.CronTimes -> [ObnamParam] -> NumClients -> Gpg.GpgKeyId -> Property
backupEncrypted dir crontimes params numclients keyid =
- backup dir crontimes (("--encrypt-with=" ++ keyid):params) numclients
+ backup dir crontimes params' numclients
`requires` Gpg.keyImported keyid "root"
+ where
+ params' = ("--encrypt-with=" ++ Gpg.getGpgKeyId keyid) : params
-- | Does a backup, but does not automatically restore.
backup' :: FilePath -> Cron.CronTimes -> [ObnamParam] -> NumClients -> Property