ksmbd-tools: Fix ksmbd service is semi-killed at system startup
The configuration for the ksmbd service is auto-generated when
the OpenWRT configuration changes, and also during startup,
hence ksmbd.init has to reload the kernel module. It does that by
calling kill_server, which does not perform cleanup. This results
in ksmbd being killed but not restarted properly during boot.
This patch resolves the issue by using stop_service, which performs
proper cleanup.
https://forum.openwrt.org/t/ksmbd-samba3-4-alternative-ex-cifsd-smbd-package-support-thread/51695/68
Signed-off-by: Georgi Valkov <gvalkov@abv.bg>
(cherry picked from commit 4af04cdc05
)
This commit is contained in:
parent
d5f5882681
commit
41ca56ff2b
2 changed files with 2 additions and 2 deletions
|
@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=ksmbd-tools
|
PKG_NAME:=ksmbd-tools
|
||||||
PKG_VERSION:=3.4.2
|
PKG_VERSION:=3.4.2
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=$(AUTORELEASE)
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
PKG_SOURCE_URL:=https://codeload.github.com/cifsd-team/ksmbd-tools/tar.gz/$(PKG_VERSION)?
|
PKG_SOURCE_URL:=https://codeload.github.com/cifsd-team/ksmbd-tools/tar.gz/$(PKG_VERSION)?
|
||||||
|
|
|
@ -150,7 +150,7 @@ start_service()
|
||||||
fi
|
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] smb.conf setting changes will be ignored, so always reset hard.
|
||||||
kill_server
|
[ -e /sys/module/ksmbd ] && stop_service
|
||||||
|
|
||||||
[ ! -e /sys/module/ksmbd ] && modprobe ksmbd 2> /dev/null
|
[ ! -e /sys/module/ksmbd ] && modprobe ksmbd 2> /dev/null
|
||||||
if [ ! -e /sys/module/ksmbd ]; then
|
if [ ! -e /sys/module/ksmbd ]; then
|
||||||
|
|
Loading…
Reference in a new issue