From c9c5a3637feb623cfd0d623ea05f0b98e9784a07 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Fri, 4 Nov 2022 12:45:32 -0700 Subject: [PATCH] ksmbd-tools: use ksmbd.conf smb.conf is deprecated. Signed-off-by: Rosen Penev --- net/ksmbd-tools/Makefile | 8 ++++---- ...{smb.conf.template => ksmbd.conf.template} | 0 net/ksmbd-tools/files/ksmbd.init | 20 +++++++++---------- 3 files changed, 14 insertions(+), 14 deletions(-) rename net/ksmbd-tools/files/{smb.conf.template => ksmbd.conf.template} (100%) diff --git a/net/ksmbd-tools/Makefile b/net/ksmbd-tools/Makefile index 8cb6981114..734dcb5419 100644 --- a/net/ksmbd-tools/Makefile +++ b/net/ksmbd-tools/Makefile @@ -28,7 +28,7 @@ endef define Package/ksmbd-tools/Default/description Userspace tools to manage the SMB kernel fileserver (ksmbd.ko). - The config file location is /etc/ksmbd/smb.conf + The config file location is /etc/ksmbd/ksmbd.conf endef define Package/ksmbd-server @@ -83,7 +83,7 @@ define Package/ksmbd-server/install $(CP) $(PKG_INSTALL_DIR)/usr/sbin/ksmbd.mountd $(1)/usr/sbin/ $(INSTALL_DIR) $(1)/etc/config $(1)/etc/ksmbd $(1)/etc/init.d $(INSTALL_CONF) ./files/ksmbd.config $(1)/etc/config/ksmbd - $(INSTALL_DATA) ./files/smb.conf.template $(1)/etc/ksmbd/ + $(INSTALL_DATA) ./files/ksmbd.conf.template $(1)/etc/ksmbd/ $(INSTALL_BIN) ./files/ksmbd.init $(1)/etc/init.d/ksmbd # copy examples until we have a wiki page $(INSTALL_DATA) ./files/ksmbd.config.example $(1)/etc/ksmbd/ @@ -101,8 +101,8 @@ endef define Package/ksmbd-server/conffiles /etc/config/ksmbd -/etc/ksmbd/smb.conf.template -/etc/ksmbd/smb.conf +/etc/ksmbd/ksmbd.conf.template +/etc/ksmbd/ksmbd.conf /etc/ksmbd/ksmbdpwd.db endef diff --git a/net/ksmbd-tools/files/smb.conf.template b/net/ksmbd-tools/files/ksmbd.conf.template similarity index 100% rename from net/ksmbd-tools/files/smb.conf.template rename to net/ksmbd-tools/files/ksmbd.conf.template diff --git a/net/ksmbd-tools/files/ksmbd.init b/net/ksmbd-tools/files/ksmbd.init index 8758ed4ec2..a14183d585 100644 --- a/net/ksmbd-tools/files/ksmbd.init +++ b/net/ksmbd-tools/files/ksmbd.init @@ -38,7 +38,7 @@ smb_header() -e "s#|WORKGROUP|#$workgroup#g" \ -e "s#|DESCRIPTION|#$description#g" \ -e "s#|INTERFACES|#$interfaces#g" \ - /etc/ksmbd/smb.conf.template > /var/etc/ksmbd/smb.conf + /etc/ksmbd/ksmbd.conf.template > /var/etc/ksmbd/ksmbd.conf { printf "\n######### Dynamic written config options #########\n" @@ -48,12 +48,12 @@ smb_header() printf "\tserver min protocol = NT1\n" printf "\tserver signing = disabled\n" fi - } >> /var/etc/ksmbd/smb.conf + } >> /var/etc/ksmbd/ksmbd.conf - [ -e /etc/ksmbd/smb.conf ] || ln -nsf /var/etc/ksmbd/smb.conf /etc/ksmbd/smb.conf + [ -e /etc/ksmbd/ksmbd.conf ] || ln -nsf /var/etc/ksmbd/ksmbd.conf /etc/ksmbd/ksmbd.conf - if [ ! -L /etc/ksmbd/smb.conf ]; then - logger -p daemon.warn -t 'ksmbd' "Local custom /etc/ksmbd/smb.conf file detected, all UCI/Luci config settings are ignored!" + if [ ! -L /etc/ksmbd/ksmbd.conf ]; then + logger -p daemon.warn -t 'ksmbd' "Local custom /etc/ksmbd/ksmbd.conf file detected, all UCI/Luci config settings are ignored!" fi } @@ -108,7 +108,7 @@ smb_add_share() [ -n "$hide_dot_files" ] && printf "\thide dot files = %s\n" "$hide_dot_files" [ -n "$veto_files" ] && printf "\tveto files = %s\n" "$veto_files" - } >> /var/etc/ksmbd/smb.conf + } >> /var/etc/ksmbd/ksmbd.conf } init_config() @@ -146,12 +146,12 @@ start_service() { init_config - if [ ! -e /etc/ksmbd/smb.conf ]; then - logger -p daemon.error -t 'ksmbd' "missing config /etc/ksmbd/smb.conf!" + if [ ! -e /etc/ksmbd/ksmbd.conf ]; then + logger -p daemon.error -t 'ksmbd' "missing config /etc/ksmbd/ksmbd.conf!" exit 1 fi - # NOTE: We don't do a soft-reload via signal, since [global] smb.conf setting changes will be ignored, so always reset hard. + # NOTE: We don't do a soft-reload via signal, since [global] ksmbd.conf setting changes will be ignored, so always reset hard. [ -e /sys/module/ksmbd ] && stop_service [ ! -e /sys/module/ksmbd ] && modprobe ksmbd 2> /dev/null @@ -164,7 +164,7 @@ start_service() procd_open_instance procd_add_mdns "smb" "tcp" "445" "daemon=ksmbd" procd_set_param command /usr/sbin/ksmbd.mountd --n - procd_set_param file /etc/ksmbd/smb.conf + procd_set_param file /etc/ksmbd/ksmbd.conf procd_set_param limits nofile=16384 procd_close_instance } -- 2.30.2