summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess2014-12-05 14:40:08 -0400
committerJoey Hess2014-12-05 14:40:08 -0400
commitad822196aa268c09f3022fe856cc30ec69f3c4d1 (patch)
tree9ddb7c28d50b8a9982c4f3e6f90ca776b6a2775f
parenta2ee8e20daf4fee456a3365c9b322abde53defa9 (diff)
propellor spin
-rw-r--r--src/Propellor/Property/OS.hs8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/Propellor/Property/OS.hs b/src/Propellor/Property/OS.hs
index 2ebf04cb..144b17f6 100644
--- a/src/Propellor/Property/OS.hs
+++ b/src/Propellor/Property/OS.hs
@@ -37,19 +37,21 @@ import Control.Exception (throw)
--
-- The files from the old os will be left in /old-os
--
+-- TODO: A forced reboot should be schedued to run after propellor finishes
+-- ensuring all properties of the host.
+--
-- You will typically want to run some more properties after the clean
-- install succeeds, to bootstrap from the cleanly installed system to
-- a fully working system. For example:
--
-- > & os (System (Debian Unstable) "amd64")
--- > & cleanInstall (Confirmed "foo.example.com")
+-- > & cleanInstallOnce (Confirmed "foo.example.com")
-- > `onChange` propertyList "fixing up after clean install"
-- > [ preserveNetworkInterfaces
-- > , preserverRootSshAuthorized
-- > -- , kernelInstalled
-- > -- , grubBoots "hd0"
-- > -- , oldOsRemoved (Confirmed "foo.example.com")
--- > -- , rebootForced
-- > ]
-- > & Apt.installed ["ssh"]
-- > & User.hasSomePassword "root"
@@ -166,7 +168,7 @@ preserveNetworkInterfaces = undefined
-- were authorized in the old OS. Any other contents of the file are
-- retained.
preserveRootSshAuthorized :: Property
-preserveRootSshAuthorized = check (doesDirectoryExist oldloc) $
+preserveRootSshAuthorized = check (fileExist oldloc) $
property (newloc ++ " copied from old OS") $ do
ks <- liftIO $ lines <$> readFile oldloc
ensureProperties (map (Ssh.authorizedKey "root") ks)