Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libguestfish: Also mount var if such a partition exists #206

Merged
merged 1 commit into from
Nov 12, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/libguestfish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down