module Propellor.Property.HostingProvider.Linode where
import Propellor.Base
import qualified Propellor.Property.Grub as Grub
import qualified Propellor.Property.File as File
serialGrub :: Property (HasInfo + DebianLike)
serialGrub :: Property (HasInfo + DebianLike)
serialGrub = [Char]
"/etc/default/grub" [Char] -> [[Char]] -> Property UnixLike
`File.containsLines`
[ [Char]
"GRUB_CMDLINE_LINUX=\"console=ttyS0,19200n8\""
, [Char]
"GRUB_DISABLE_LINUX_UUID=true"
, [Char]
"GRUB_SERIAL_COMMAND=\"serial --speed=19200 --unit=0 --word=8 --parity=no --stop=1\""
, [Char]
"GRUB_TERMINAL=serial"
]
Property UnixLike
-> Property DebianLike
-> CombinedType (Property UnixLike) (Property DebianLike)
forall x y. Combines x y => x -> y -> CombinedType x y
`onChange` Property DebianLike
Grub.mkConfig
Property DebianLike
-> Property
(Sing '[ 'WithInfo, 'Targeting 'OSDebian, 'Targeting 'OSBuntish])
-> CombinedType
(Property DebianLike)
(Property
(Sing '[ 'WithInfo, 'Targeting 'OSDebian, 'Targeting 'OSBuntish]))
forall x y. Combines x y => x -> y -> CombinedType x y
`requires` GrubTarget -> Property (HasInfo + DebianLike)
Grub.installed GrubTarget
Grub.PC
Property
(Sing '[ 'WithInfo, 'Targeting 'OSDebian, 'Targeting 'OSBuntish])
-> [Char]
-> Property
(Sing '[ 'WithInfo, 'Targeting 'OSDebian, 'Targeting 'OSBuntish])
forall p. IsProp p => p -> [Char] -> p
`describe` [Char]
"GRUB configured for Linode serial console"
chainPVGrub :: Grub.TimeoutSecs -> Property (HasInfo + DebianLike)
chainPVGrub :: TimeoutSecs -> Property (HasInfo + DebianLike)
chainPVGrub = [Char] -> [Char] -> TimeoutSecs -> Property (HasInfo + DebianLike)
Grub.chainPVGrub [Char]
"hd0" [Char]
"xen/xvda"
mlocateEnabled :: Property DebianLike
mlocateEnabled :: Property DebianLike
mlocateEnabled = Property UnixLike -> Property DebianLike
forall (p :: * -> *) (untightened :: [MetaType])
(tightened :: [MetaType]).
(TightenTargets p, TightenTargetsAllowed untightened tightened,
SingI tightened) =>
p (MetaTypes untightened) -> p (MetaTypes tightened)
tightenTargets (Property UnixLike -> Property DebianLike)
-> Property UnixLike -> Property DebianLike
forall a b. (a -> b) -> a -> b
$
[Char]
"/etc/cron.daily/mlocate"
[Char] -> FileMode -> Property UnixLike
`File.mode` [FileMode] -> FileMode
combineModes ([FileMode]
readModes [FileMode] -> [FileMode] -> [FileMode]
forall a. [a] -> [a] -> [a]
++ [FileMode]
executeModes)