From 2ef44b568753486ef61f1705257d226fb0d49827 Mon Sep 17 00:00:00 2001 From: david Date: Mon, 12 Sep 2016 12:23:34 +0200 Subject: [PATCH] mxmount: Avoid mounting /amd/host/0 a second time 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 6c9441e1051ff31893f93ab8405e6825d3d5f243 ("fix data0 destination overmount") --- mxmount/mxmount | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mxmount/mxmount b/mxmount/mxmount index 3a90016..cb1a98c 100755 --- a/mxmount/mxmount +++ b/mxmount/mxmount @@ -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; }