Merge pull request #7199 from Andy2244/samba4-fix_hostname

samba4: fix hostname if not defined via Dnsmasq
This commit is contained in:
Dirk Brenken 2018-10-17 08:13:17 +02:00 committed by GitHub
commit 995f6e0e80
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 4 deletions

View file

@ -3,7 +3,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=samba PKG_NAME:=samba
PKG_VERSION:=4.9.1 PKG_VERSION:=4.9.1
PKG_RELEASE:=3 PKG_RELEASE:=4
PKG_MAINTAINER:=Andy Walsh <andy.walsh44+github@gmail.com> PKG_MAINTAINER:=Andy Walsh <andy.walsh44+github@gmail.com>
PKG_LICENSE:=GPL-3.0-only PKG_LICENSE:=GPL-3.0-only

View file

@ -21,9 +21,7 @@ smb_header() {
local workgroup description charset local workgroup description charset
# we dont use netbios anymore as default and wsd/avahi is dns based # we dont use netbios anymore as default and wsd/avahi is dns based
local hostname="$(uci get system.@system[0].hostname)" local hostname="$(cat /proc/sys/kernel/hostname)"
local domain="$(uci get dhcp.@dnsmasq[0].domain)"
[ -n "$domain" ] && hostname="$hostname.$domain"
config_get workgroup $1 workgroup "WORKGROUP" config_get workgroup $1 workgroup "WORKGROUP"
config_get description $1 description "Samba on OpenWrt" config_get description $1 description "Samba on OpenWrt"