propellor spin

This commit is contained in:
Joey Hess 2014-04-13 11:14:43 -04:00
parent 622a3d8a93
commit 6d12630431
Failed to extract signature
2 changed files with 5 additions and 3 deletions

View File

@ -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
)

View File

@ -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) "")
]