summaryrefslogtreecommitdiff
path: root/src/Propellor/Property/HostingProvider/Linode.hs
blob: 40be4c2e6213914c90b1a98744c795bb0f75a380 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
module Propellor.Property.HostingProvider.Linode where

import Propellor
import qualified Propellor.Property.Grub as Grub
import qualified Propellor.Property.File as File
import Utility.FileMode

-- | Linode's pv-grub-x86_64 does not currently support booting recent
-- Debian kernels compressed with xz. This sets up pv-grub chaining to enable
-- it.
chainPVGrub :: Grub.TimeoutSecs -> Property NoInfo
chainPVGrub = Grub.chainPVGrub "hd0" "xen/xvda"

-- | Linode disables mlocate's cron job's execute permissions,
-- presumably to avoid disk IO. This ensures it's executable.
mlocateEnabled :: Property NoInfo
mlocateEnabled = "/etc/cron.daily/mlocate"
	`File.mode` combineModes (readModes ++ executeModes)