diff options
| author | Joey Hess <joeyh@joeyh.name> | 2016-06-13 23:32:59 -0400 |
|---|---|---|
| committer | Joey Hess <joeyh@joeyh.name> | 2016-06-13 23:32:59 -0400 |
| commit | da2b3eacc182430cbf30dfde9df2829a11186a30 (patch) | |
| tree | 3325d51c6d6fa0d5b7c5493896d023b5a1c5a287 /src/Propellor/Property/HostingProvider | |
| parent | 156539843030958c98b24ae9c40152f1093a77b2 (diff) | |
avoid using Architecture for what's really a kernel flavor
Diffstat (limited to 'src/Propellor/Property/HostingProvider')
| -rw-r--r-- | src/Propellor/Property/HostingProvider/Exoscale.hs | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/Propellor/Property/HostingProvider/Exoscale.hs b/src/Propellor/Property/HostingProvider/Exoscale.hs index 3e6f6665..18e3c42f 100644 --- a/src/Propellor/Property/HostingProvider/Exoscale.hs +++ b/src/Propellor/Property/HostingProvider/Exoscale.hs @@ -12,20 +12,23 @@ import qualified Propellor.Property.Grub as Grub import qualified Propellor.Property.Apt as Apt import qualified Propellor.Property.Reboot as Reboot +-- | Flavor of kernel, eg "amd64" or "686" +type KernelFlavor = String + -- | The current Exoshare Debian image doesn't install GRUB, so this property -- makes sure GRUB is installed and correctly configured -- -- In case an old, insecure kernel is running, we check for an old kernel -- version and reboot immediately if one is found. -- --- Note that we ignore anything after the first hyphen when considering whether --- the running kernel's version is older than the Debian-supplied kernel's --- version. -distroKernel :: Architecture -> Property DebianLike -distroKernel arch = go `flagFile` theFlagFile +-- Note that we ignore anything after the first hyphen when considering +-- whether the running kernel's version is older than the Debian-supplied +-- kernel's version. +distroKernel :: KernelFlavor -> Property DebianLike +distroKernel kernelflavor = go `flagFile` theFlagFile where go = combineProperties "boots distro kernel" $ props - & Apt.installed ["grub2", "linux-image-" ++ arch] + & Apt.installed ["grub2", "linux-image-" ++ kernelflavor] & Grub.boots "/dev/vda" & Grub.mkConfig -- Since we're rebooting we have to manually create the flagfile |
