Browse Source

samba4: fix hostname if not defined via Dnsmasq

* use kernel fs to get the hostname, drop domainname

Signed-off-by: Andy Walsh <andy.walsh44+github@gmail.com>
lilik-openwrt-22.03
Andy Walsh 6 years ago
parent
commit
409feb8ef6
2 changed files with 2 additions and 4 deletions
  1. +1
    -1
      net/samba4/Makefile
  2. +1
    -3
      net/samba4/files/samba.init

+ 1
- 1
net/samba4/Makefile View 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


+ 1
- 3
net/samba4/files/samba.init View 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"


Loading…
Cancel
Save