summaryrefslogtreecommitdiffstats
path: root/etc/autofs
diff options
context:
space:
mode:
Diffstat (limited to 'etc/autofs')
-rwxr-xr-xetc/autofs/special_media7
1 files changed, 7 insertions, 0 deletions
diff --git a/etc/autofs/special_media b/etc/autofs/special_media
index 2a654b1..32f9478 100755
--- a/etc/autofs/special_media
+++ b/etc/autofs/special_media
@@ -19,6 +19,9 @@ print_available() {
_fstype="${_fstype_and_label%% *}"
if [ "${_fstype}" != "${_fstype_and_label}" ]; then
_label="${_fstype_and_label#* }"
+ # Replace plus signs and slashes with minuses;
+ # leading plus signs have special meaning in maps,
+ _label="$(echo ${_label} | sed 's,[+/],-,g')"
echo "${_label}"
continue
fi
@@ -54,6 +57,10 @@ print_one() {
fi
_label="${_fstype_and_label#* }"
+ # Replace plus signs and slashes with minuses;
+ # leading plus signs have special meaning in maps,
+ # and multi-component keys are just not supported.
+ _label="$(echo ${_label} | sed 's,[+/],-,g')"
if [ "${_label}" != "${_key}" ]; then
# Labels don't match, try another device.
continue
OpenPOWER on IntegriCloud