diff --git a/src/libguestfish.sh b/src/libguestfish.sh index 4691eda6b9..d16d39b3bf 100755 --- a/src/libguestfish.sh +++ b/src/libguestfish.sh @@ -42,10 +42,16 @@ coreos_gf_run_mount() { local boot boot=$(coreos_gf findfs-label boot) coreos_gf mount "${boot}" /boot + var=$(coreos_gf -findfs-label var || true) # Export these variables for further use stateroot=/ostree/deploy/$(coreos_gf ls /ostree/deploy) deploydir="${stateroot}"/deploy/$(coreos_gf ls "${stateroot}"/deploy | grep -v \.origin) + if [ -n "${var}" ]; then + # Since it doesn't look like libguestfs supports bind mounts, and other + # code processes the stateroot directory, let's mount it there. + coreos_gf mount "${var}" "${stateroot}"/var + fi export stateroot deploydir }