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.hs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Propellor/Property/Grub.hs b/src/Propellor/Property/Grub.hs
index 9dd5e8e1..0eaab2bb 100644
--- a/src/Propellor/Property/Grub.hs
+++ b/src/Propellor/Property/Grub.hs
@@ -3,6 +3,7 @@ module Propellor.Property.Grub where
import Propellor.Base
import qualified Propellor.Property.File as File
import qualified Propellor.Property.Apt as Apt
+import Propellor.Property.Chroot (inChroot)
-- | Eg, \"hd0,0\" or \"xen/xvda1\"
type GrubDevice = String
@@ -18,9 +19,10 @@ data BIOS = PC | EFI64 | EFI32 | Coreboot | Xen
-- | Installs the grub package. This does not make grub be used as the
-- bootloader.
--
--- This includes running update-grub.
+-- This includes running update-grub, unless it's run in a chroot.
installed :: BIOS -> Property DebianLike
-installed bios = installed' bios `onChange` mkConfig
+installed bios = installed' bios
+ `onChange` (check (not <$> inChroot) mkConfig)
-- Run update-grub, to generate the grub boot menu. It will be
-- automatically updated when kernel packages are installed.