From 67a1bb6d9915a0c36b71d984cf0ef4c89dd59607 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 28 Mar 2016 03:54:28 -0400 Subject: propellor spin --- src/Propellor/Property/Grub.hs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src') 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" -- cgit v1.2.3