From ef2f3d33de13df6e364de41bc5ed952fafaa0027 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 4 Jan 2015 18:20:02 -0400 Subject: Fix bug that prevented deploying ssh host keys when the file for the key didn't already exist. This is not a new bug. --- debian/changelog | 7 +++++++ src/Propellor/Property/Ssh.hs | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 1cf57117..a454ac58 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 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 diff --git a/src/Propellor/Property/Ssh.hs b/src/Propellor/Property/Ssh.hs index b6ed476e..e8671a22 100644 --- a/src/Propellor/Property/Ssh.hs +++ b/src/Propellor/Property/Ssh.hs @@ -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 -- cgit v1.2.3