samba4: add UCI option 'disable_async_io'
* add UCI option 'disable_async_io' * remove [homes] options Signed-off-by: Andy Walsh <andy.walsh44+github@gmail.com>
This commit is contained in:
parent
58010dbd88
commit
ec3225b495
3 changed files with 9 additions and 17 deletions
|
@ -3,7 +3,7 @@ include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=samba
|
PKG_NAME:=samba
|
||||||
PKG_VERSION:=4.9.15
|
PKG_VERSION:=4.9.15
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=2
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
PKG_SOURCE_URL:=https://ftp.heanet.ie/mirrors/ftp.samba.org/stable/ \
|
PKG_SOURCE_URL:=https://ftp.heanet.ie/mirrors/ftp.samba.org/stable/ \
|
||||||
|
|
|
@ -2,5 +2,3 @@ config samba
|
||||||
option 'workgroup' 'WORKGROUP'
|
option 'workgroup' 'WORKGROUP'
|
||||||
option 'description' 'Samba on OpenWrt'
|
option 'description' 'Samba on OpenWrt'
|
||||||
option 'charset' 'UTF-8'
|
option 'charset' 'UTF-8'
|
||||||
option 'homes' '0'
|
|
||||||
|
|
||||||
|
|
|
@ -33,6 +33,7 @@ smb_header() {
|
||||||
config_get_bool DISABLE_NETBIOS $1 disable_netbios 0
|
config_get_bool DISABLE_NETBIOS $1 disable_netbios 0
|
||||||
config_get_bool DISABLE_AD_DC $1 disable_ad_dc 0
|
config_get_bool DISABLE_AD_DC $1 disable_ad_dc 0
|
||||||
config_get_bool DISABLE_WINBIND $1 disable_winbind 0
|
config_get_bool DISABLE_WINBIND $1 disable_winbind 0
|
||||||
|
config_get_bool DISABLE_ASYNC_IO $1 disable_async_io 0
|
||||||
|
|
||||||
mkdir -p /var/etc
|
mkdir -p /var/etc
|
||||||
sed -e "s#|NAME|#$hostname#g" \
|
sed -e "s#|NAME|#$hostname#g" \
|
||||||
|
@ -48,19 +49,12 @@ smb_header() {
|
||||||
printf "\tdisable netbios = yes\n"
|
printf "\tdisable netbios = yes\n"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
local homes
|
if [ "$DISABLE_ASYNC_IO" -eq 1 ]; then
|
||||||
config_get_bool homes $1 homes 0
|
printf "\taio read size = 0\n"
|
||||||
[ $homes -gt 0 ] && {
|
printf "\taio write size = 0\n"
|
||||||
cat <<EOT
|
# sendfile bug: https://bugzilla.samba.org/show_bug.cgi?id=14095
|
||||||
|
printf "\tuse sendfile = no\n"
|
||||||
[homes]
|
fi
|
||||||
comment = Home Directories
|
|
||||||
browsable = no
|
|
||||||
writable = yes
|
|
||||||
read only = no
|
|
||||||
create mask = 0750
|
|
||||||
EOT
|
|
||||||
}
|
|
||||||
} >> /var/etc/smb.conf
|
} >> /var/etc/smb.conf
|
||||||
|
|
||||||
[ -e /etc/samba/smb.conf ] || ln -nsf /var/etc/smb.conf /etc/samba/smb.conf
|
[ -e /etc/samba/smb.conf ] || ln -nsf /var/etc/smb.conf /etc/samba/smb.conf
|
||||||
|
|
Loading…
Reference in a new issue