summaryrefslogtreecommitdiff
path: root/src/Propellor/Property/DiskImage.hs
diff options
context:
space:
mode:
authorJoey Hess2015-10-22 20:18:11 -0400
committerJoey Hess2015-10-22 20:18:11 -0400
commit69d1021c0c12bae52cbea2cc64399be4e4b3532f (patch)
tree281bd592bbaf43ce6a47663112f1128243081efa /src/Propellor/Property/DiskImage.hs
parent3c5ba882433e19ec5ef8ff659172aaa7de7e7f56 (diff)
propellor spin
Diffstat (limited to 'src/Propellor/Property/DiskImage.hs')
-rw-r--r--src/Propellor/Property/DiskImage.hs11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/Propellor/Property/DiskImage.hs b/src/Propellor/Property/DiskImage.hs
index 4715ba08..cb38cef3 100644
--- a/src/Propellor/Property/DiskImage.hs
+++ b/src/Propellor/Property/DiskImage.hs
@@ -331,9 +331,9 @@ grubBooted bios = (Grub.installed' bios, boots)
where
boots mnt loopdevs = combineProperties "disk image boots using grub"
-- bind mount host /dev so grub can access the loop devices
- [ mounted "bind" "/dev" (mnt <> "dev")
- , mounted "proc" "proc" (mnt <> "proc")
- , mounted "sysfs" "sys" (mnt <> "sys")
+ [ mounted "bind" "/dev" (inmnt "/dev")
+ , mounted "proc" "proc" (inmnt "/proc")
+ , mounted "sysfs" "sys" (inmnt "/sys")
-- work around for http://bugs.debian.org/802717
, check haveosprober $ inchroot "chmod" ["-x", osprober]
, inchroot "update-grub" []
@@ -345,9 +345,12 @@ grubBooted bios = (Grub.installed' bios, boots)
, cmdProperty "sync" []
]
where
+ -- cannot use </> since the filepath is absolute
+ inmnt f = mnt ++ f
+
inchroot cmd ps = cmdProperty "chroot" ([mnt, cmd] ++ ps)
- haveosprober = doesFileExist (mnt ++ osprober)
+ haveosprober = doesFileExist (inmnt osprober)
osprober = "/etc/grub.d/30_os-prober"
-- It doesn't matter which loopdev we use; all