mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-10 07:44:50 +01:00
samba: prevent multiple lines from being written from uci to smb.conf #16885
This commit is contained in:
parent
d1ad9dc34f
commit
8784439985
1 changed files with 1 additions and 1 deletions
|
|
@ -144,7 +144,7 @@ smb_add_share() {
|
|||
path=$(readlink -f $path)
|
||||
[ "${path:0:4}" == "/mnt" ] || path="/mnt/"
|
||||
|
||||
echo -e "\n[$name]\n\tpath = ${path%%\\n*}" >> /var/etc/smb.conf
|
||||
echo -e "\n[$(echo -e $name | head -1)]\n\tpath = $(echo -e $path | head -1)" >> /var/etc/smb.conf
|
||||
[ -n "$users" ] && echo -e "\tvalid users = $users" | head -1 >> /var/etc/smb.conf
|
||||
[ -n "$read_only" ] && echo -e "\tread only = $read_only" | head -1 >> /var/etc/smb.conf
|
||||
[ -n "$guest_ok" ] && echo -e "\tguest ok = $guest_ok" | head -1 >> /var/etc/smb.conf
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue