ksmbd: use hostname only as name
authorFritz D. Ansel <fdansel@yandex.ru>
Sun, 15 Aug 2021 15:05:56 +0000 (17:05 +0200)
committerHannu Nyman <hannu.nyman@iki.fi>
Sun, 15 Aug 2021 15:07:07 +0000 (18:07 +0300)
even if a fqdn (with domain) is set by user

Signed-off-by: Fritz D. Ansel <fdansel@yandex.ru>
net/ksmbd-tools/Makefile
net/ksmbd-tools/files/ksmbd.init

index 04867f7b566a6c66484f5a6a1000acaff1e11fde..a29999542a6226963b1f547a6919dcab74457a14 100644 (file)
@@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ksmbd-tools
 PKG_VERSION:=3.4.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/cifsd-team/ksmbd-tools/tar.gz/$(PKG_VERSION)?
index 194d3f9b68945fe6c29809cdc9fde890e12c7402..2c296b10b7a403f7e0fcd5dba09bf82173dec37c 100644 (file)
@@ -28,7 +28,7 @@ smb_header()
        )
 
        # we dont use netbios anymore as default and wsd/avahi is dns based
-       hostname="$(cat /proc/sys/kernel/hostname | tr -d '{};%?=#\n')"
+       hostname="$(sed 's/\..*//' /proc/sys/kernel/hostname | tr -d '{};%?=#\n')"
 
        config_get_sane workgroup "$1" workgroup "WORKGROUP"
        config_get_sane description "$1" description "Ksmbd on OpenWrt"