From 0ec565a590e0b5e70af4f4f922925e5b0b718376 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 23 May 2014 12:30:25 -0400 Subject: propellor spin --- .../Property/HostingProvider/DigitalOcean.hs | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/Propellor/Property/HostingProvider/DigitalOcean.hs (limited to 'src/Propellor/Property/HostingProvider/DigitalOcean.hs') diff --git a/src/Propellor/Property/HostingProvider/DigitalOcean.hs b/src/Propellor/Property/HostingProvider/DigitalOcean.hs new file mode 100644 index 00000000..24dfd356 --- /dev/null +++ b/src/Propellor/Property/HostingProvider/DigitalOcean.hs @@ -0,0 +1,21 @@ +module Propellor.Property.HostingProvider.DigitalOcean where + +import Propellor +import qualified Propellor.Property.Apt as Apt +import qualified Propellor.Property.File as File + +-- Digital Ocean does not provide any way to boot +-- the kernel provided by the distribution, except using kexec. +-- Without this, some old, and perhaps insecure kernel will be used. +-- +-- Note that this only causes the new kernel to be loaded on reboot. +-- If the power is cycled, the old kernel still boots up. +-- TODO: detect this and reboot immediately? +distroKernel :: Property +distroKernel = propertyList "digital ocean distro kernel hack" + [ Apt.installed ["grub-pc", "kexec-tools"] + , "/etc/default/kexec" `File.containsLines` + [ "LOAD_KEXEC=true" + , "USE_GRUB_CONFIG=true" + ] + ] -- cgit v1.2.3 From aba5e143f20f0ef8e3b278c11d351be9fe256bcc Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 23 May 2014 12:31:42 -0400 Subject: desc --- src/Propellor/Property/HostingProvider/DigitalOcean.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Propellor/Property/HostingProvider/DigitalOcean.hs') diff --git a/src/Propellor/Property/HostingProvider/DigitalOcean.hs b/src/Propellor/Property/HostingProvider/DigitalOcean.hs index 24dfd356..4565935f 100644 --- a/src/Propellor/Property/HostingProvider/DigitalOcean.hs +++ b/src/Propellor/Property/HostingProvider/DigitalOcean.hs @@ -17,5 +17,5 @@ distroKernel = propertyList "digital ocean distro kernel hack" , "/etc/default/kexec" `File.containsLines` [ "LOAD_KEXEC=true" , "USE_GRUB_CONFIG=true" - ] + ] `describe` "kexec configured" ] -- cgit v1.2.3