samba4: fix hostname if not defined via Dnsmasq
authorAndy Walsh <redacted>
Mon, 15 Oct 2018 08:28:01 +0000 (10:28 +0200)
committerAndy Walsh <redacted>
Mon, 15 Oct 2018 08:28:01 +0000 (10:28 +0200)
* use kernel fs to get the hostname, drop domainname

Signed-off-by: Andy Walsh <redacted>
net/samba4/Makefile
net/samba4/files/samba.init

index c724d144541528b3ddf01f38a4eb411fc3bdacf9..f6e8b43d02d52297068f3a7199b6416aaf4ce8bb 100644 (file)
@@ -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 <andy.walsh44+github@gmail.com>
 PKG_LICENSE:=GPL-3.0-only
index 7034330f7014d7705a7bbb1ba2c799ec099f4ab5..09714f0167fd0860c16ca6fc66527780b7c0065c 100644 (file)
@@ -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"
git clone https://git.99rst.org/PROJECT