automounted enforces indirect map syntax for a newline-based format of browse items. However, depending on filesystem media names may have whitespace or #-character embedded in them. $ cat /etc/auto_master /foo -foo $ cat /etc/autofs/special_foo #! /bin/sh if [ $# -eq 0 ]; then echo "Long Name foo#bar" else case $1 in Long\ Name|foo#bar) echo "/ -fstype=nullfs :/bin" ;; esac fi $ ls -FR /foo Long/ Name/ foo/ /foo/Long: /foo/Name: /foo/foo: $ ls -1 /foo/Long\ Name [ cat chflags chio ... or a more real example in attachment 146087 [details]: $ simple-mtpfs -l 1: VendorMyPhone XYZ (MTP) 2: AB-123 Another Phone L MTP+ADB $ ls -FR /mtp VendorMyPhone/ XYZ/ (MTP)/ AB-123/ Another/ Phone/ L/ MTP+ADB/ /foo/VendorMyPhone: /foo/XYZ: ...
(In reply to Jan Beich from comment #0) > if [ $# -eq 0 ]; then > echo "Long Name foo#bar" Oops, this should be if [ $# -eq 0 ]; then echo "Long Name" echo "foo#bar"
A commit references this bug: Author: trasz Date: Sun Aug 24 12:32:27 UTC 2014 New revision: 270454 URL: http://svnweb.freebsd.org/changeset/base/270454 Log: Fix handling of keys in executable maps. Previously it was broken for keys containing whitespace. PR: 192947 MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Changes: head/usr.sbin/autofs/common.c
A commit references this bug: Author: trasz Date: Sun Aug 31 21:56:42 UTC 2014 New revision: 270903 URL: http://svnweb.freebsd.org/changeset/base/270903 Log: MFC r270454: Fix handling of keys in executable maps. Previously it was broken for keys containing whitespace. PR: 192947 Sponsored by: The FreeBSD Foundation Changes: _U stable/10/ stable/10/usr.sbin/autofs/common.c