summaryrefslogtreecommitdiff
path: root/src/Propellor/Property/Grub.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Propellor/Property/Grub.hs')
-rw-r--r--src/Propellor/Property/Grub.hs10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/Propellor/Property/Grub.hs b/src/Propellor/Property/Grub.hs
index b8dc5f9e..85d098ed 100644
--- a/src/Propellor/Property/Grub.hs
+++ b/src/Propellor/Property/Grub.hs
@@ -30,13 +30,11 @@ mkConfig = tightenTargets $ cmdProperty "update-grub" []
-- | Installs grub; does not run update-grub.
installed' :: BIOS -> Property Linux
-installed' bios = withOS "grub package installed" $ \w o ->
- let apt = ensureProperty w (Apt.installed [debpkg])
- in case o of
- (Just (System (Debian _) _)) -> apt
- (Just (System (Buntish _) _)) -> apt
- _ -> unsupportedOS
+installed' bios = (aptinstall `pickOS` aptinstall)
+ `describe` "grub package installed"
where
+ aptinstall :: Property DebianLike
+ aptinstall = Apt.installed [debpkg]
debpkg = case bios of
PC -> "grub-pc"
EFI64 -> "grub-efi-amd64"