summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog2
-rw-r--r--src/Propellor/Property/Grub.hs3
2 files changed, 5 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
index c66038d6..f91ee8cb 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -20,6 +20,8 @@ propellor (4.7.0) UNRELEASED; urgency=medium
* Sbuild: Updated sample config in haddock for Propellor.Property.Sbuild.
If you use this module, please compare both your config.hs and
your ~/.sbuildrc with the haddock documentation.
+ * Grub.bootsMounted: Avoid failing when proc sys etc are already mounted
+ within the chroot.
-- Joey Hess <id@joeyh.name> Fri, 28 Jul 2017 20:13:58 -0400
diff --git a/src/Propellor/Property/Grub.hs b/src/Propellor/Property/Grub.hs
index 739a63e9..dbc34f4b 100644
--- a/src/Propellor/Property/Grub.hs
+++ b/src/Propellor/Property/Grub.hs
@@ -97,6 +97,9 @@ chainPVGrub rootdev bootdev timeout = combineProperties desc $ props
-- not a partition).
bootsMounted :: FilePath -> OSDevice -> Property Linux
bootsMounted mnt wholediskdev = combineProperties desc $ props
+ -- remove mounts that are done below to make sure the right thing
+ -- gets mounted
+ & cleanupmounts
-- bind mount host /dev so grub can access the loop devices
& bindMount "/dev" (inmnt "/dev")
& mounted "proc" "proc" (inmnt "/proc") mempty