summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Propellor/Property/Obnam.hs4
-rw-r--r--Propellor/Property/Ssh.hs4
2 files changed, 5 insertions, 3 deletions
diff --git a/Propellor/Property/Obnam.hs b/Propellor/Property/Obnam.hs
index b7d34223..00e0bbef 100644
--- a/Propellor/Property/Obnam.hs
+++ b/Propellor/Property/Obnam.hs
@@ -72,7 +72,9 @@ restored dir params = Property (dir ++ " restored by obnam") go
`requires` installed
where
go = ifM (liftIO needsRestore)
- ( liftIO restore
+ ( do
+ warningMessage $ dir ++ " is empty/missing; restoring from backup ..."
+ liftIO restore
, noChange
)
diff --git a/Propellor/Property/Ssh.hs b/Propellor/Property/Ssh.hs
index 2fc3c560..cb3b9231 100644
--- a/Propellor/Property/Ssh.hs
+++ b/Propellor/Property/Ssh.hs
@@ -80,7 +80,7 @@ randomHostKeys = flagFile prop "/etc/ssh/.unique_host_keys"
--
-- (Uses a null username for host keys.)
hostKey :: SshKeyType -> Property
-hostKey keytype = propertyList desc
+hostKey keytype = combineProperties desc
[ Property desc (install writeFile (SshPubKey keytype "") ".pub")
, Property desc (install writeFileProtected (SshPrivKey keytype "") "")
]
@@ -97,7 +97,7 @@ hostKey keytype = propertyList desc
-- | Sets up a user with a ssh private key and public key pair
-- from the site's PrivData.
keyImported :: SshKeyType -> UserName -> Property
-keyImported keytype user = propertyList desc
+keyImported keytype user = combineProperties desc
[ Property desc (install writeFile (SshPubKey keytype user) ".pub")
, Property desc (install writeFileProtected (SshPrivKey keytype user) "")
]