I've retested this with autofs 5.1.5 (eoan), and @ahasenack's suggested change to auto.smb is definitely required. With the $ escaped, mount fails as it's given a literal \$ in the path.
For older versions of autofs, the following workaround works (tested with autofs 5.1.2 on bionic):
/etc/default/autofs:
# Use OPTIONS to add automount(8) command line options that
# will be used when the daemon is started.
#
OPTIONS="-Ddollar='$'"
/etc/auto.smb:
@@ -76,7 +76,7 @@
loc = $2
# Enclose mount dir and location in quotes
# Double quote "$" in location as it is special
- gsub(/\$$/, "\\$", loc);
+ gsub(/\$$/, "$dollar", loc);
gsub(/\&/,"\\\\&",loc)
print " \\\n\t \"/" dir "\"", "\"://" key "/" loc "\""
}
I've retested this with autofs 5.1.5 (eoan), and @ahasenack's suggested change to auto.smb is definitely required. With the $ escaped, mount fails as it's given a literal \$ in the path.
For older versions of autofs, the following workaround works (tested with autofs 5.1.2 on bionic): autofs: "-Ddollar= '$'"
/etc/default/
# Use OPTIONS to add automount(8) command line options that
# will be used when the daemon is started.
#
OPTIONS=
/etc/auto.smb: /\&/,"\ \\\&",loc)
@@ -76,7 +76,7 @@
loc = $2
# Enclose mount dir and location in quotes
# Double quote "$" in location as it is special
- gsub(/\$$/, "\\$", loc);
+ gsub(/\$$/, "$dollar", loc);
gsub(
print " \\\n\t \"/" dir "\"", "\"://" key "/" loc "\""
}