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 `requires` installed
where where
go = ifM (liftIO needsRestore) go = ifM (liftIO needsRestore)
( liftIO restore ( do
warningMessage $ dir ++ " is empty/missing; restoring from backup ..."
liftIO restore
, noChange , noChange
) )

View File

@ -80,7 +80,7 @@ randomHostKeys = flagFile prop "/etc/ssh/.unique_host_keys"
-- --
-- (Uses a null username for host keys.) -- (Uses a null username for host keys.)
hostKey :: SshKeyType -> Property hostKey :: SshKeyType -> Property
hostKey keytype = propertyList desc hostKey keytype = combineProperties desc
[ Property desc (install writeFile (SshPubKey keytype "") ".pub") [ Property desc (install writeFile (SshPubKey keytype "") ".pub")
, Property desc (install writeFileProtected (SshPrivKey keytype "") "") , 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 -- | Sets up a user with a ssh private key and public key pair
-- from the site's PrivData. -- from the site's PrivData.
keyImported :: SshKeyType -> UserName -> Property 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 writeFile (SshPubKey keytype user) ".pub")
, Property desc (install writeFileProtected (SshPrivKey keytype user) "") , Property desc (install writeFileProtected (SshPrivKey keytype user) "")
] ]