3
# This file must be executable to work! chmod 755!
8
for P in /bin /sbin /usr/bin /usr/sbin
10
if [ -x $P/smbclient ]
12
SMBCLIENT=$P/smbclient
17
[ -x $SMBCLIENT ] || exit 1
19
$SMBCLIENT -gNL $key 2>/dev/null| awk -v key="$key" -v opts="$opts" -F'|' -- '
20
BEGIN { ORS=""; first=1 }
26
# Enclose mount dir and location in quotes
27
# Double quote "$" in location as it is special
28
gsub(/\$$/, "\\$", loc);
29
print " \\\n\t \"/" dir "\"", "\"://" key "/" loc "\""
31
END { if (!first) print "\n"; else exit 1 }