fix: Invalid Samba NetBIOS hostname (#1961)

This commit is contained in:
Kroese
2026-07-25 14:58:10 +02:00
committed by GitHub
parent bc17fdfe74
commit 2ee0ae2e28
+9 -3
View File
@@ -24,8 +24,7 @@ configureNetwork() {
hostname="$UPLINK"
interfaces="$DEV"
return 0
fi
else
hostname="host.lan"
@@ -39,6 +38,13 @@ configureNetwork() {
interfaces+=",$SAMBA_INTERFACE"
fi
fi
netbios="${hostname%%.*}"
netbios="${netbios:0:15}"
[ -z "$netbios" ] && netbios="host"
return 0
}
@@ -145,7 +151,7 @@ writeConfig() {
if ! {
echo "[global]"
echo " server string = Dockur"
echo " netbios name = $hostname"
echo " netbios name = $netbios"
echo " workgroup = WORKGROUP"
echo " interfaces = $interfaces"
echo " bind interfaces only = yes"