From 80190c923ba28079ef23c4d630c9a7df3d4ee5c6 Mon Sep 17 00:00:00 2001 From: David Bremner Date: Sun, 7 Oct 2018 21:53:29 -0300 Subject: Add a DirectBoot bootloader type. This doesn't actually do anything to the chroot in question, just marks it as needing to be boot directly, e.g. by some external kernel and initrd. --- src/Propellor/Property/DirectBoot.hs | 7 +++++++ src/Propellor/Types/Bootloader.hs | 2 ++ 2 files changed, 9 insertions(+) create mode 100644 src/Propellor/Property/DirectBoot.hs (limited to 'src') diff --git a/src/Propellor/Property/DirectBoot.hs b/src/Propellor/Property/DirectBoot.hs new file mode 100644 index 00000000..4807471e --- /dev/null +++ b/src/Propellor/Property/DirectBoot.hs @@ -0,0 +1,7 @@ +module Propellor.Property.DirectBoot(installed) where + +import Propellor.Base +import Propellor.Types.Bootloader + +installed :: Property (HasInfo + UnixLike) +installed = pureInfoProperty "direct boot" [DirectBoot] diff --git a/src/Propellor/Types/Bootloader.hs b/src/Propellor/Types/Bootloader.hs index 65117bd2..cdb37a31 100644 --- a/src/Propellor/Types/Bootloader.hs +++ b/src/Propellor/Types/Bootloader.hs @@ -10,6 +10,7 @@ data BootloaderInstalled = GrubInstalled GrubTarget | FlashKernelInstalled | UbootInstalled (FilePath -> FilePath -> Property Linux) + | DirectBoot deriving (Typeable) -- | Platforms that grub can boot. @@ -19,6 +20,7 @@ instance Show BootloaderInstalled where show (GrubInstalled _) = "GrubInstalled" show FlashKernelInstalled = "FlashKernelInstalled" show (UbootInstalled _) = "UbootInstalled" + show DirectBoot = "DirectBoot" instance IsInfo [BootloaderInstalled] where propagateInfo _ = PropagateInfo False -- cgit v1.2.3