From db6583b997f8e1432167a7723083e7f7d3c70ab3 Mon Sep 17 00:00:00 2001 From: David Personette Date: Sun, 2 Aug 2015 08:23:04 -0400 Subject: [PATCH] samba.sh / README.md try to clarify the share users argument... --- README.md | 1 + samba.sh | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 292ff46..bff1fa7 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,7 @@ OR set local storage: required arg: ";;" is how it's called for clients path to share + NOTE: for the default values, just leave blank [browseable] default:'yes' or 'no' [readonly] default:'yes' or 'no' [guest] allowed default:'yes' or 'no' diff --git a/samba.sh b/samba.sh index 4cccfb9..b7cf5b2 100755 --- a/samba.sh +++ b/samba.sh @@ -46,7 +46,7 @@ share() { local share="$1" path="$2" browse=${3:-yes} ro=${4:-yes}\ echo " browseable = $browse" >> $file echo " read only = $ro" >> $file echo " guest ok = $guest" >> $file - [[ ${users:-""} ]] && + [[ ${users:-""} && ! ${users:-""} =~ all ]] && echo " valid users = $(tr ',' ' ' <<< $users)" >> $file echo -e "" >> $file } @@ -88,6 +88,7 @@ Options (fields in '[]' are optional, '<>' are required): required arg: \";;\" is how it's called for clients path to share + NOTE: for the default value, just leave blank [browseable] default:'yes' or 'no' [readonly] default:'yes' or 'no' [guest] allowed default:'yes' or 'no'