mirror of
https://github.com/dockur/windows.git
synced 2026-08-03 20:47:12 +01:00
fix: Invalid Samba NetBIOS hostname (#1961)
This commit is contained in:
+9
-3
@@ -24,8 +24,7 @@ configureNetwork() {
|
|||||||
hostname="$UPLINK"
|
hostname="$UPLINK"
|
||||||
interfaces="$DEV"
|
interfaces="$DEV"
|
||||||
|
|
||||||
return 0
|
else
|
||||||
fi
|
|
||||||
|
|
||||||
hostname="host.lan"
|
hostname="host.lan"
|
||||||
|
|
||||||
@@ -39,6 +38,13 @@ configureNetwork() {
|
|||||||
interfaces+=",$SAMBA_INTERFACE"
|
interfaces+=",$SAMBA_INTERFACE"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
netbios="${hostname%%.*}"
|
||||||
|
netbios="${netbios:0:15}"
|
||||||
|
|
||||||
|
[ -z "$netbios" ] && netbios="host"
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -145,7 +151,7 @@ writeConfig() {
|
|||||||
if ! {
|
if ! {
|
||||||
echo "[global]"
|
echo "[global]"
|
||||||
echo " server string = Dockur"
|
echo " server string = Dockur"
|
||||||
echo " netbios name = $hostname"
|
echo " netbios name = $netbios"
|
||||||
echo " workgroup = WORKGROUP"
|
echo " workgroup = WORKGROUP"
|
||||||
echo " interfaces = $interfaces"
|
echo " interfaces = $interfaces"
|
||||||
echo " bind interfaces only = yes"
|
echo " bind interfaces only = yes"
|
||||||
|
|||||||
Reference in New Issue
Block a user