Fix bug that prevented deploying ssh host keys when the file for the key didn't already exist.

This is not a new bug.
This commit is contained in:
Joey Hess 2015-01-04 18:20:02 -04:00
parent f21d6fcb2d
commit ef2f3d33de
2 changed files with 8 additions and 1 deletions

7
debian/changelog vendored
View File

@ -1,3 +1,10 @@
propellor (1.3.1) UNRELEASED; urgency=medium
* Fix bug that prevented deploying ssh host keys when the file for the
key didn't already exist.
-- Joey Hess <id@joeyh.name> Sun, 04 Jan 2015 18:19:30 -0400
propellor (1.3.0) unstable; urgency=medium
* --spin checks if the DNS matches any configured IP address property

View File

@ -120,7 +120,7 @@ hostKey context keytype pub = combineProperties desc
desc = "ssh host key configured (" ++ fromKeyType keytype ++ ")"
install writer ispub key = do
let f = keyFile keytype ispub
s <- liftIO $ readFileStrict f
s <- liftIO $ catchDefaultIO "" $ readFileStrict f
if s == key
then noChange
else makeChange $ writer f key