Skip to content

Commit

Permalink
mxmount: Avoid mounting /amd/host/0 a second time
Browse files Browse the repository at this point in the history
When booting from a usb stick, `/amd/mxonastick/0` is explicitly mounted
with a label other than data0. However, if there is an existing "data0"
filesystem (e.g. on the internal hdd), this is mounted on top of it.

There is code to avoid that in mxmounts, but it doesn't work because
`DEFAULT_MOUNT_PREFIX` contains `/amd/SHORTHOST` and so the path is
compared to `/amd/SHORTHOST/$hostname/0` instead of `/amd/$hostname/0`.

Fixes 6c9441e ("fix data0 destination
overmount")
  • Loading branch information
david authored and donald committed Feb 6, 2023
1 parent 307fd52 commit 2ef44b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mxmount/mxmount
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ sub add_data0_if_not_present {
if ($mp->{label} eq "data0") {
return;
}
if ($mp->{mountpoint} eq "$V{DEFAULT_MOUNT_PREFIX}/$hostname/0") {
if ($mp->{mountpoint} eq "/amd/$hostname/0") {
print STDERR "$mp->{mountpoint} already blocked by $mp->{label}\n";
return;
}
Expand Down

0 comments on commit 2ef44b5

Please sign in to comment.