From abc2058c6033886873a3c02254eb3e9cb8d4e489 Mon Sep 17 00:00:00 2001 From: crees Date: Fri, 28 Dec 2018 15:11:22 +0000 Subject: [PATCH] There is no way of escaping literal $ signs in auto_master(5), which makes for difficulty with hidden Samba shares; shares with $ at the end of their name. This enables the use of ${DOLLAR} to work around this. Reviewed by: bcr (man page) Approved by: trasz Differential Revision: https://reviews.freebsd.org/D7048 --- usr.sbin/autofs/auto_master.5 | 4 +++- usr.sbin/autofs/defined.c | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/usr.sbin/autofs/auto_master.5 b/usr.sbin/autofs/auto_master.5 index e630028e081..28b9edf89f9 100644 --- a/usr.sbin/autofs/auto_master.5 +++ b/usr.sbin/autofs/auto_master.5 @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 13, 2015 +.Dd December 28, 2018 .Dt AUTO_MASTER 5 .Os .Sh NAME @@ -187,6 +187,8 @@ Expands to the output of .Li "uname -p" . .It Li CPU Same as ARCH. +.It Li DOLLAR +A literal $ sign. .It Li HOST Expands to the output of .Li "uname -n" . diff --git a/usr.sbin/autofs/defined.c b/usr.sbin/autofs/defined.c index f8145137acb..4cdce7fd9bd 100644 --- a/usr.sbin/autofs/defined.c +++ b/usr.sbin/autofs/defined.c @@ -266,6 +266,7 @@ defined_init(void) defined_add("ARCH", name.machine); defined_add("CPU", name.machine); + defined_add("DOLLAR", "$"); defined_add("HOST", name.nodename); defined_add("OSNAME", name.sysname); defined_add("OSREL", name.release); -- 2.45.0