summaryrefslogtreecommitdiff
path: root/src/Propellor/Types/Bootloader.hs
blob: 52a6da029f623cc6f5309665b2fab27a46e61c85 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
{-# LANGUAGE FlexibleInstances, DeriveDataTypeable #-}

module Propellor.Types.Bootloader where

import Propellor.Types
import Propellor.Types.Info

-- | Boot loader installed on a host.
data BootloaderInstalled
	= GrubInstalled GrubTarget
	| FlashKernelInstalled
	| UbootInstalled (FilePath -> FilePath -> Property Linux)
	| NoBootloader
	deriving (Typeable)

-- | Platforms that grub can boot.
data GrubTarget = PC | EFI64 | EFI32 | Coreboot | Xen

instance Show BootloaderInstalled where
	show (GrubInstalled _) = "GrubInstalled"
	show FlashKernelInstalled = "FlashKernelInstalled"
	show (UbootInstalled _) = "UbootInstalled"
	show NoBootloader = "NoBootloader"

instance IsInfo [BootloaderInstalled] where
	propagateInfo _ = PropagateInfo False