samba4: fix missing busybox 'hostname -f' command
authorAndy Walsh <redacted>
Sat, 29 Sep 2018 00:05:19 +0000 (02:05 +0200)
committerYousong Zhou <redacted>
Sat, 29 Sep 2018 03:06:09 +0000 (11:06 +0800)
* busybox does not have 'hostname' by default so replaced it with uci calls

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

index c19797b9bebcf8c3ee096a9552ecda533a977ca5..c724d144541528b3ddf01f38a4eb411fc3bdacf9 100644 (file)
@@ -3,7 +3,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=samba
 PKG_VERSION:=4.9.1
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_MAINTAINER:=Andy Walsh <andy.walsh44+github@gmail.com>
 PKG_LICENSE:=GPL-3.0-only
index beafd99626235eb0abfdeee218b211c637190448..7034330f7014d7705a7bbb1ba2c799ec099f4ab5 100644 (file)
@@ -21,7 +21,9 @@ smb_header() {
 
        local workgroup description charset
        # we dont use netbios anymore as default and wsd/avahi is dns based
-       local hostname="$(hostname -f)"
+       local hostname="$(uci get system.@system[0].hostname)"
+       local domain="$(uci get dhcp.@dnsmasq[0].domain)"
+       [ -n "$domain" ] && hostname="$hostname.$domain"
 
        config_get workgroup            $1 workgroup    "WORKGROUP"
        config_get description          $1 description  "Samba on OpenWrt"
git clone https://git.99rst.org/PROJECT