samba4: add UCI option 'disable_async_io' 10619/head
authorAndy Walsh <andy.walsh44+github@gmail.com>
Fri, 22 Nov 2019 13:15:12 +0000 (14:15 +0100)
committerAndy Walsh <andy.walsh44+github@gmail.com>
Fri, 22 Nov 2019 13:15:12 +0000 (14:15 +0100)
* add UCI option 'disable_async_io'
* remove [homes] options

Signed-off-by: Andy Walsh <andy.walsh44+github@gmail.com>
net/samba4/Makefile
net/samba4/files/samba.config
net/samba4/files/samba.init

index 966596dbbd83b98ec4465eb7d1e2c883c925a853..7c98181463eeaed54734190e8aef21ba2dffde81 100644 (file)
@@ -3,7 +3,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=samba
 PKG_VERSION:=4.9.15
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://ftp.heanet.ie/mirrors/ftp.samba.org/stable/ \
index 332bb27914ecc4f7337e7d329edcf47e874f0570..38983aa91a7c0f47ea9eee8ffc91b6eb7c99de9e 100644 (file)
@@ -2,5 +2,3 @@ config samba
        option 'workgroup'              'WORKGROUP'
        option 'description'    'Samba on OpenWrt'
        option 'charset'                'UTF-8'
-       option 'homes'                  '0'
-
index 39686e6cd4ed57f7c7f1a47634072ff3641b72d8..5b81db2c4be72fda2f5cc08caedfc1f33384af4b 100644 (file)
@@ -33,6 +33,7 @@ smb_header() {
        config_get_bool DISABLE_NETBIOS $1 disable_netbios      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_ASYNC_IO $1 disable_async_io    0
 
        mkdir -p /var/etc
        sed -e "s#|NAME|#$hostname#g" \
@@ -47,20 +48,13 @@ smb_header() {
                if [ "$DISABLE_NETBIOS" -eq 1 ] || [ ! -x /usr/sbin/nmbd ]; then
                        printf "\tdisable netbios = yes\n"
                fi
-
-               local homes
-               config_get_bool homes $1 homes 0
-               [ $homes -gt 0 ] && {
-                       cat <<EOT
-
-[homes]
-       comment     = Home Directories
-       browsable   = no
-       writable = yes
-       read only   = no
-       create mask = 0750
-EOT
-               }
+               
+               if [ "$DISABLE_ASYNC_IO" -eq 1 ]; then
+                       printf "\taio read size = 0\n"
+                       printf "\taio write size = 0\n"
+                       # sendfile bug: https://bugzilla.samba.org/show_bug.cgi?id=14095
+                       printf "\tuse sendfile = no\n"
+               fi
        } >> /var/etc/smb.conf
 
        [ -e /etc/samba/smb.conf ] || ln -nsf /var/etc/smb.conf /etc/samba/smb.conf