diff options
| author | Sean Whitton <spwhitton@spwhitton.name> | 2016-06-12 09:47:23 +0900 |
|---|---|---|
| committer | Sean Whitton <spwhitton@spwhitton.name> | 2016-06-12 09:47:23 +0900 |
| commit | e20599639212ca6223f94a88dbff6641ed54234f (patch) | |
| tree | ae2e6952d9f9515b78ed7d638c24dc0fe04cb53a /src | |
| parent | 5423d7a5e25907d126944921fff0fba2451cf11b (diff) | |
re-organise Exoscale.distroKernel
Diffstat (limited to 'src')
| -rw-r--r-- | src/Propellor/Property/HostingProvider/Exoscale.hs | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/src/Propellor/Property/HostingProvider/Exoscale.hs b/src/Propellor/Property/HostingProvider/Exoscale.hs index a123c54a..6bf19cbc 100644 --- a/src/Propellor/Property/HostingProvider/Exoscale.hs +++ b/src/Propellor/Property/HostingProvider/Exoscale.hs @@ -5,6 +5,7 @@ module Propellor.Property.HostingProvider.Exoscale ( ) where import Propellor.Base +import qualified Propellor.Property.File as File import qualified Propellor.Property.Grub as Grub import qualified Propellor.Property.Apt as Apt import qualified Propellor.Property.Reboot as Reboot @@ -15,12 +16,13 @@ import qualified Propellor.Property.Reboot as Reboot -- We reboot after doing this because 'Sbuild.built' will fail to set up an -- overlay-type chroot on an old kernel distroKernel :: Architecture -> Property DebianLike -distroKernel arch = combineProperties "boots distro kernel" $ props - & Grub.installed' Grub.PC - & Apt.installed ["linux-image-" ++ arch] - -- only these ones are not idempotent so need flag file - & flagFile - (Grub.boots "/dev/vda" - `before` Grub.mkConfig - `before` Reboot.now) - "/etc/propellor-distro-kernel" +distroKernel arch = go `flagFile` theFlagFile + where + go = combineProperties "boots distro kernel" $ props + & Apt.installed ["grub2", "linux-image-" ++ arch] + & Grub.boots "/dev/vda" + & Grub.mkConfig + -- Since we're rebooting we have to manually create the flagfile + & File.hasContent theFlagFile [""] + & Reboot.toDistroKernel + theFlagFile = "/etc/propellor-distro-kernel" |
