From 5e18093fefe72fbd6028132ba793bb303b1cd3c7 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 13 Oct 2018 20:58:37 -0400 Subject: name bikeshedding --- src/Propellor/Property/DirectBoot.hs | 7 ------- src/Propellor/Property/DiskImage.hs | 15 +++++++++++---- 2 files changed, 11 insertions(+), 11 deletions(-) delete mode 100644 src/Propellor/Property/DirectBoot.hs (limited to 'src/Propellor/Property') diff --git a/src/Propellor/Property/DirectBoot.hs b/src/Propellor/Property/DirectBoot.hs deleted file mode 100644 index 4807471e..00000000 --- a/src/Propellor/Property/DirectBoot.hs +++ /dev/null @@ -1,7 +0,0 @@ -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/Property/DiskImage.hs b/src/Propellor/Property/DiskImage.hs index a41af18c..fa41808e 100644 --- a/src/Propellor/Property/DiskImage.hs +++ b/src/Propellor/Property/DiskImage.hs @@ -18,6 +18,7 @@ module Propellor.Property.DiskImage ( imageBuiltFrom, imageExists, GrubTarget(..), + noBootloader, ) where import Propellor.Base @@ -228,7 +229,7 @@ imageBuilt' rebuild img mkchroot tabletype partspec = ubootFlashKernelFinalized p [FlashKernelInstalled, UbootInstalled p] -> ubootFlashKernelFinalized p - [DirectBoot] -> directBootFinalized + [NoBootloader] -> noBootloaderFinalized _ -> unbootable "multiple bootloaders are installed; don't know which to use" -- | This property is automatically added to the chroot when building a @@ -470,9 +471,6 @@ grubFinalized grubtarget _img mnt loopdevs = ubootFinalized :: (FilePath -> FilePath -> Property Linux) -> Finalization ubootFinalized p (RawDiskImage img) mnt _loopdevs = p img mnt -directBootFinalized :: Finalization -directBootFinalized _img _mnt _loopDevs = doNothing - flashKernelFinalized :: Finalization flashKernelFinalized _img mnt _loopdevs = FlashKernel.flashKernelMounted mnt @@ -481,6 +479,15 @@ ubootFlashKernelFinalized p img mnt loopdevs = ubootFinalized p img mnt loopdevs `before` flashKernelFinalized img mnt loopdevs +-- | Normally a boot loader is installed on a disk image. However, +-- when the disk image will be booted by eg qemu booting the kernel and +-- initrd, no boot loader is needed, and this property can be used. +noBootloader :: Property (HasInfo + UnixLike) +noBootloader = pureInfoProperty "no bootloader" [NoBootloader] + +noBootloaderFinalized :: Finalization +noBootloaderFinalized _img _mnt _loopDevs = doNothing + isChild :: FilePath -> Maybe MountPoint -> Bool isChild mntpt (Just d) | d `equalFilePath` mntpt = False -- cgit v1.2.3