propellor spin
This commit is contained in:
parent
a2ee8e20da
commit
ad822196aa
|
@ -37,19 +37,21 @@ import Control.Exception (throw)
|
||||||
--
|
--
|
||||||
-- The files from the old os will be left in /old-os
|
-- 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
|
-- You will typically want to run some more properties after the clean
|
||||||
-- install succeeds, to bootstrap from the cleanly installed system to
|
-- install succeeds, to bootstrap from the cleanly installed system to
|
||||||
-- a fully working system. For example:
|
-- a fully working system. For example:
|
||||||
--
|
--
|
||||||
-- > & os (System (Debian Unstable) "amd64")
|
-- > & os (System (Debian Unstable) "amd64")
|
||||||
-- > & cleanInstall (Confirmed "foo.example.com")
|
-- > & cleanInstallOnce (Confirmed "foo.example.com")
|
||||||
-- > `onChange` propertyList "fixing up after clean install"
|
-- > `onChange` propertyList "fixing up after clean install"
|
||||||
-- > [ preserveNetworkInterfaces
|
-- > [ preserveNetworkInterfaces
|
||||||
-- > , preserverRootSshAuthorized
|
-- > , preserverRootSshAuthorized
|
||||||
-- > -- , kernelInstalled
|
-- > -- , kernelInstalled
|
||||||
-- > -- , grubBoots "hd0"
|
-- > -- , grubBoots "hd0"
|
||||||
-- > -- , oldOsRemoved (Confirmed "foo.example.com")
|
-- > -- , oldOsRemoved (Confirmed "foo.example.com")
|
||||||
-- > -- , rebootForced
|
|
||||||
-- > ]
|
-- > ]
|
||||||
-- > & Apt.installed ["ssh"]
|
-- > & Apt.installed ["ssh"]
|
||||||
-- > & User.hasSomePassword "root"
|
-- > & User.hasSomePassword "root"
|
||||||
|
@ -166,7 +168,7 @@ preserveNetworkInterfaces = undefined
|
||||||
-- were authorized in the old OS. Any other contents of the file are
|
-- were authorized in the old OS. Any other contents of the file are
|
||||||
-- retained.
|
-- retained.
|
||||||
preserveRootSshAuthorized :: Property
|
preserveRootSshAuthorized :: Property
|
||||||
preserveRootSshAuthorized = check (doesDirectoryExist oldloc) $
|
preserveRootSshAuthorized = check (fileExist oldloc) $
|
||||||
property (newloc ++ " copied from old OS") $ do
|
property (newloc ++ " copied from old OS") $ do
|
||||||
ks <- liftIO $ lines <$> readFile oldloc
|
ks <- liftIO $ lines <$> readFile oldloc
|
||||||
ensureProperties (map (Ssh.authorizedKey "root") ks)
|
ensureProperties (map (Ssh.authorizedKey "root") ks)
|
||||||
|
|
Loading…
Reference in New Issue