From f76146635c0949af69287933406411209e1b8184 Mon Sep 17 00:00:00 2001 From: David Personette Date: Thu, 12 Oct 2017 11:28:34 -0400 Subject: [PATCH] samba.sh fix #76 --- samba.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samba.sh b/samba.sh index 99e2db6..3b89d55 100755 --- a/samba.sh +++ b/samba.sh @@ -37,7 +37,7 @@ charmap() { local chars="$1" file=/etc/samba/smb.conf # Arguments: # option) raw option # Return: line added to smb.conf (replaces existing line with same key) -global() { local key="${1%%=*}" value="${1##*=}" file=/etc/samba/smb.conf +global() { local key="${1%%=*}" value="${1#*=}" file=/etc/samba/smb.conf if grep -qE '^\s*'"$key" "$file"; then sed -i 's|^\s*'"$key"'.*| '"$key = $value"'|' "$file" else