1
0
mirror of https://github.com/dockur/windows.git synced 2026-07-27 21:42:36 +07:00

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
+18 -12
View File
@@ -24,20 +24,26 @@ configureNetwork() {
hostname="$UPLINK"
interfaces="$DEV"
return 0
fi
hostname="host.lan"
if isUserMode; then
interfaces="lo"
else
interfaces="$BRIDGE"
hostname="host.lan"
if isUserMode; then
interfaces="lo"
else
interfaces="$BRIDGE"
fi
if [ -n "${SAMBA_INTERFACE:-}" ]; then
interfaces+=",$SAMBA_INTERFACE"
fi
fi
if [ -n "${SAMBA_INTERFACE:-}" ]; then
interfaces+=",$SAMBA_INTERFACE"
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"