From 409feb8ef6b81525d8d55e4b40b392d35848a58c Mon Sep 17 00:00:00 2001 From: Andy Walsh Date: Mon, 15 Oct 2018 10:28:01 +0200 Subject: [PATCH] samba4: fix hostname if not defined via Dnsmasq * use kernel fs to get the hostname, drop domainname Signed-off-by: Andy Walsh --- net/samba4/Makefile | 2 +- net/samba4/files/samba.init | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/net/samba4/Makefile b/net/samba4/Makefile index c724d1445..f6e8b43d0 100644 --- a/net/samba4/Makefile +++ b/net/samba4/Makefile @@ -3,7 +3,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=samba PKG_VERSION:=4.9.1 -PKG_RELEASE:=3 +PKG_RELEASE:=4 PKG_MAINTAINER:=Andy Walsh PKG_LICENSE:=GPL-3.0-only diff --git a/net/samba4/files/samba.init b/net/samba4/files/samba.init index 7034330f7..09714f016 100644 --- a/net/samba4/files/samba.init +++ b/net/samba4/files/samba.init @@ -21,9 +21,7 @@ smb_header() { local workgroup description charset # we dont use netbios anymore as default and wsd/avahi is dns based - local hostname="$(uci get system.@system[0].hostname)" - local domain="$(uci get dhcp.@dnsmasq[0].domain)" - [ -n "$domain" ] && hostname="$hostname.$domain" + local hostname="$(cat /proc/sys/kernel/hostname)" config_get workgroup $1 workgroup "WORKGROUP" config_get description $1 description "Samba on OpenWrt"