diff options
| author | Joey Hess <joeyh@joeyh.name> | 2017-07-28 20:38:02 -0400 |
|---|---|---|
| committer | Joey Hess <joeyh@joeyh.name> | 2017-07-28 20:38:02 -0400 |
| commit | 1aac2336977a6c589b00f99eb18b26edee86a7a0 (patch) | |
| tree | 5a2cca0a80131e4feb1613874c62dfd8b783cd30 /src/Propellor/Property/Grub.hs | |
| parent | e485839d394ce364b3c756ddb908a4c423f99d3e (diff) | |
Grub.bootsMounted: Avoid failing when proc sys etc are already mounted within the chroot.
Perhaps it should keep track of what was mounted before and restore it,
but it would complicate it a lot, and I doubt it would be needed by any use
of this property. Usually, this property will come after a chroot
provisioning property, which may leave proc and sys mounted, but that's
done only so that the chroot can later be used; and when bootsMounted is
applied to a chroot, the goal is presumably to boot the underlying disk
soon.
Diffstat (limited to 'src/Propellor/Property/Grub.hs')
| -rw-r--r-- | src/Propellor/Property/Grub.hs | 3 |
1 files changed, 3 insertions, 0 deletions
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 |
