mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-10 07:44:50 +01:00
Revert "samba: prevent mulitple lines from being written to an option in smb.conf"
This reverts commit 88291c196a.
This commit is contained in:
parent
d4b4304ea7
commit
38a1faae48
1 changed files with 7 additions and 13 deletions
|
|
@ -80,12 +80,6 @@ smb_header() {
|
||||||
config_get description $1 description "Samba on ${hostname:-OpenWrt}"
|
config_get description $1 description "Samba on ${hostname:-OpenWrt}"
|
||||||
config_get charset $1 charset "UTF-8"
|
config_get charset $1 charset "UTF-8"
|
||||||
|
|
||||||
name=`echo -e "$name" | head -1`
|
|
||||||
workgroup=`echo -e "$workgroup" | head -1`
|
|
||||||
description=`echo -e "$description" | head -1`
|
|
||||||
interfaces=`echo -e "$interfaces" | head -1`
|
|
||||||
charset=`echo -e "$charset" | head -1`
|
|
||||||
|
|
||||||
mkdir -p /var/etc
|
mkdir -p /var/etc
|
||||||
sed -e "s#|NAME|#$name#g" \
|
sed -e "s#|NAME|#$name#g" \
|
||||||
-e "s#|WORKGROUP|#$workgroup#g" \
|
-e "s#|WORKGROUP|#$workgroup#g" \
|
||||||
|
|
@ -144,13 +138,13 @@ smb_add_share() {
|
||||||
path=$(readlink -f $path)
|
path=$(readlink -f $path)
|
||||||
[ "${path:0:4}" == "/mnt" ] || path="/mnt/"
|
[ "${path:0:4}" == "/mnt" ] || path="/mnt/"
|
||||||
|
|
||||||
echo -e "\n[$name]\n\tpath = ${path%%\\n*}" >> /var/etc/smb.conf
|
echo -e "\n[$name]\n\tpath = $path" >> /var/etc/smb.conf
|
||||||
[ -n "$users" ] && echo -e "\tvalid users = $users" | head -1 >> /var/etc/smb.conf
|
[ -n "$users" ] && echo -e "\tvalid users = $users" >> /var/etc/smb.conf
|
||||||
[ -n "$read_only" ] && echo -e "\tread only = $read_only" | head -1 >> /var/etc/smb.conf
|
[ -n "$read_only" ] && echo -e "\tread only = $read_only" >> /var/etc/smb.conf
|
||||||
[ -n "$guest_ok" ] && echo -e "\tguest ok = $guest_ok" | head -1 >> /var/etc/smb.conf
|
[ -n "$guest_ok" ] && echo -e "\tguest ok = $guest_ok" >> /var/etc/smb.conf
|
||||||
[ -n "$create_mask" ] && echo -e "\tcreate mask = $create_mask" | head -1 >> /var/etc/smb.conf
|
[ -n "$create_mask" ] && echo -e "\tcreate mask = $create_mask" >> /var/etc/smb.conf
|
||||||
[ -n "$dir_mask" ] && echo -e "\tdirectory mask = $dir_mask" | head -1 >> /var/etc/smb.conf
|
[ -n "$dir_mask" ] && echo -e "\tdirectory mask = $dir_mask" >> /var/etc/smb.conf
|
||||||
[ -n "$browseable" ] && echo -e "\tbrowseable = $browseable" | head -1 >> /var/etc/smb.conf
|
[ -n "$browseable" ] && echo -e "\tbrowseable = $browseable" >> /var/etc/smb.conf
|
||||||
}
|
}
|
||||||
|
|
||||||
start_service() {
|
start_service() {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue