Merge branch 'joeyconfig'
This commit is contained in:
commit
9d06d2f835
|
@ -90,7 +90,7 @@ stdSourcesListFor suite = stdSourcesList' suite []
|
|||
-- | Adds additional sources.list generators.
|
||||
--
|
||||
-- Note that if a Property needs to enable an apt source, it's better
|
||||
-- to do so via a separate file in /etc/apt/sources.list.d/
|
||||
-- to do so via a separate file in </etc/apt/sources.list.d/>
|
||||
stdSourcesList' :: DebianSuite -> [SourcesGenerator] -> Property
|
||||
stdSourcesList' suite more = setSourcesList
|
||||
(concatMap (\gen -> gen suite) generators)
|
||||
|
|
|
@ -233,7 +233,7 @@ makeWrapperScript dir = do
|
|||
]
|
||||
modifyFileMode wrapperScript (addModes $ readModes ++ executeModes)
|
||||
|
||||
-- Work around for http://bugs.debian.org/770217
|
||||
-- Work around for <http://bugs.debian.org/770217>
|
||||
makeDevicesTarball :: IO ()
|
||||
makeDevicesTarball = do
|
||||
-- TODO append to tarball; avoid writing to /dev
|
||||
|
|
|
@ -176,7 +176,7 @@ garbageCollected = propertyList "docker garbage collected"
|
|||
-- | Tweaks a container to work well with docker.
|
||||
--
|
||||
-- Currently, this consists of making pam_loginuid lines optional in
|
||||
-- the pam config, to work around https://github.com/docker/docker/issues/5663
|
||||
-- the pam config, to work around <https://github.com/docker/docker/issues/5663>
|
||||
-- which affects docker 1.2.0.
|
||||
tweaked :: Property
|
||||
tweaked = trivial $
|
||||
|
@ -529,7 +529,7 @@ dockerInfo :: DockerInfo Host -> Info
|
|||
dockerInfo i = mempty { _dockerinfo = i }
|
||||
|
||||
-- | The ContainerIdent of a container is written to
|
||||
-- /.propellor-ident inside it. This can be checked to see if
|
||||
-- </.propellor-ident> inside it. This can be checked to see if
|
||||
-- the container has the same ident later.
|
||||
propellorIdent :: FilePath
|
||||
propellorIdent = "/.propellor-ident"
|
||||
|
|
|
@ -4,10 +4,10 @@ import Propellor
|
|||
import qualified Propellor.Property.File as File
|
||||
import qualified Propellor.Property.Apt as Apt
|
||||
|
||||
-- | Eg, hd0,0 or xen/xvda1
|
||||
-- | Eg, "hd0,0" or "xen/xvda1"
|
||||
type GrubDevice = String
|
||||
|
||||
-- | Eg, /dev/sda
|
||||
-- | Eg, "/dev/sda"
|
||||
type OSDevice = String
|
||||
|
||||
type TimeoutSecs = Int
|
||||
|
@ -51,7 +51,7 @@ boots dev = cmdProperty "grub-install" [dev]
|
|||
--
|
||||
-- Useful when the VPS's pv-grub is too old to boot a modern kernel image.
|
||||
--
|
||||
-- http://notes.pault.ag/linode-pv-grub-chainning/
|
||||
-- <http://notes.pault.ag/linode-pv-grub-chainning/>
|
||||
--
|
||||
-- The rootdev should be in the form "hd0", while the bootdev is in the form
|
||||
-- "xen/xvda".
|
||||
|
|
|
@ -7,14 +7,14 @@ import Data.List
|
|||
|
||||
-- | Ensures that the hostname is set using best practices.
|
||||
--
|
||||
-- Configures `/etc/hostname` and the current hostname.
|
||||
-- Configures </etc/hostname> and the current hostname.
|
||||
--
|
||||
-- Configures `/etc/mailname` with the domain part of the hostname.
|
||||
-- Configures </etc/mailname> with the domain part of the hostname.
|
||||
--
|
||||
-- `/etc/hosts` is also configured, with an entry for 127.0.1.1, which is
|
||||
-- </etc/hosts> is also configured, with an entry for 127.0.1.1, which is
|
||||
-- standard at least on Debian to set the FDQN.
|
||||
--
|
||||
-- Also, the `/etc/hosts` 127.0.0.1 line is set to localhost. Putting any
|
||||
-- Also, the </etc/hosts> 127.0.0.1 line is set to localhost. Putting any
|
||||
-- other hostnames there is not best practices and can lead to annoying
|
||||
-- messages from eg, apache.
|
||||
sane :: Property
|
||||
|
@ -44,7 +44,7 @@ setTo hn = combineProperties desc go
|
|||
(ip ++ "\t" ++ (unwords names)) : filter (not . hasip ip) ls
|
||||
hasip ip l = headMaybe (words l) == Just ip
|
||||
|
||||
-- | Makes `/etc/resolv.conf` contain search and domain lines for
|
||||
-- | Makes </etc/resolv.conf> contain search and domain lines for
|
||||
-- the domain that the hostname is in.
|
||||
searchDomain :: Property
|
||||
searchDomain = property desc (ensureProperty . go =<< asks hostName)
|
||||
|
|
|
@ -33,10 +33,10 @@ import Control.Exception (throw)
|
|||
-- the property to.
|
||||
--
|
||||
-- This property only runs once. The cleanly installed system will have
|
||||
-- a file /etc/propellor-cleaninstall, which indicates it was cleanly
|
||||
-- a file </etc/propellor-cleaninstall>, which indicates it was cleanly
|
||||
-- installed.
|
||||
--
|
||||
-- The files from the old os will be left in /old-os
|
||||
-- The files from the old os will be left in </old-os>
|
||||
--
|
||||
-- After the OS is installed, and if all properties of the host have
|
||||
-- been successfully satisfied, the host will be rebooted to properly load
|
||||
|
@ -188,13 +188,13 @@ confirmed desc (Confirmed c) = property desc $ do
|
|||
return FailedChange
|
||||
else return NoChange
|
||||
|
||||
-- | /etc/network/interfaces is configured to bring up the network
|
||||
-- | </etc/network/interfaces> is configured to bring up the network
|
||||
-- interface that currently has a default route configured, using
|
||||
-- the same (static) IP address.
|
||||
preserveNetwork :: Property
|
||||
preserveNetwork = undefined -- TODO
|
||||
|
||||
-- | /etc/resolv.conf is copied the from the old OS
|
||||
-- | </etc/resolv.conf> is copied from the old OS
|
||||
preserveResolvConf :: Property
|
||||
preserveResolvConf = check (fileExist oldloc) $
|
||||
property (newloc ++ " copied from old OS") $ do
|
||||
|
@ -204,7 +204,7 @@ preserveResolvConf = check (fileExist oldloc) $
|
|||
newloc = "/etc/resolv.conf"
|
||||
oldloc = oldOSDir ++ newloc
|
||||
|
||||
-- | Root's .ssh/authorized_keys has added to it any ssh keys that
|
||||
-- | </root/.ssh/authorized_keys> has added to it any ssh keys that
|
||||
-- were authorized in the old OS. Any other contents of the file are
|
||||
-- retained.
|
||||
preserveRootSshAuthorized :: Property
|
||||
|
@ -216,7 +216,7 @@ preserveRootSshAuthorized = check (fileExist oldloc) $
|
|||
newloc = "/root/.ssh/authorized_keys"
|
||||
oldloc = oldOSDir ++ newloc
|
||||
|
||||
-- Removes the old OS's backup from /old-os
|
||||
-- Removes the old OS's backup from </old-os>
|
||||
oldOSRemoved :: Confirmation -> Property
|
||||
oldOSRemoved confirmation = check (doesDirectoryExist oldOSDir) $
|
||||
go `requires` confirmed "old OS backup removal confirmed" confirmation
|
||||
|
|
|
@ -50,7 +50,7 @@ mappedFile f setup = setup f
|
|||
`onChange` cmdProperty "postmap" [f]
|
||||
|
||||
-- | Run newaliases command, which should be done after changing
|
||||
-- /etc/aliases.
|
||||
-- </etc/aliases>.
|
||||
newaliases :: Property
|
||||
newaliases = trivial $ cmdProperty "newaliases" []
|
||||
|
||||
|
|
|
@ -227,7 +227,7 @@ containerCfg p = RevertableProperty (mk True) (mk False)
|
|||
('-':_) -> p
|
||||
_ -> "--" ++ p
|
||||
|
||||
-- | Bind mounts /etc/resolv.conf from the host into the container.
|
||||
-- | Bind mounts </etc/resolv.conf> from the host into the container.
|
||||
--
|
||||
-- This property is enabled by default. Revert it to disable it.
|
||||
resolvConfed :: RevertableProperty
|
||||
|
|
Loading…
Reference in New Issue