From 6bac8c627573cca1bf859ebe746ef02c46a72a20 Mon Sep 17 00:00:00 2001 From: "Fritz D. Ansel" Date: Mon, 2 Aug 2021 20:05:56 +0200 Subject: [PATCH] samba4: use hostname only as name even if a fqdn (with domain) is set by user Signed-off-by: Fritz D. Ansel --- net/samba4/files/samba.init | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/samba4/files/samba.init b/net/samba4/files/samba.init index 7cb2f66e75..b849a1cd37 100644 --- a/net/samba4/files/samba.init +++ b/net/samba4/files/samba.init @@ -26,7 +26,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 "Samba on OpenWrt" -- 2.30.2