mirror of
https://github.com/dockur/windows.git
synced 2025-10-13 15:26:04 +01:00
feat: Support more network types (#1453)
This commit is contained in:
parent
b3f1cb913a
commit
17db1ac34c
28
src/samba.sh
28
src/samba.sh
@ -12,23 +12,23 @@ rm -rf /var/run/wsdd.pid
|
|||||||
[[ "$SAMBA" == [Nn]* ]] && return 0
|
[[ "$SAMBA" == [Nn]* ]] && return 0
|
||||||
[[ "$NETWORK" == [Nn]* ]] && return 0
|
[[ "$NETWORK" == [Nn]* ]] && return 0
|
||||||
|
|
||||||
hostname="host.lan"
|
|
||||||
interfaces="dockerbridge"
|
|
||||||
|
|
||||||
if [ -n "${SAMBA_INTERFACE:-}" ]; then
|
|
||||||
interfaces+=",$SAMBA_INTERFACE"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ "$DHCP" == [Yy1]* ]]; then
|
if [[ "$DHCP" == [Yy1]* ]]; then
|
||||||
hostname="$IP"
|
hostname="$IP"
|
||||||
interfaces="$VM_NET_DEV"
|
interfaces="$VM_NET_DEV"
|
||||||
fi
|
else
|
||||||
|
hostname="host.lan"
|
||||||
if [[ "${NETWORK,,}" == "user"* ]]; then
|
case "${NETWORK,,}" in
|
||||||
interfaces="lo"
|
"user"* | "passt" | "slirp" )
|
||||||
if ! ip link set "$interfaces" multicast on >/dev/null; then
|
interfaces="lo"
|
||||||
warn "Failed to enable multicast on loopback interface!"
|
if ! ip link set "$interfaces" multicast on >/dev/null; then
|
||||||
fi
|
warn "Failed to enable multicast on loopback interface!"
|
||||||
|
fi ;;
|
||||||
|
*)
|
||||||
|
interfaces="dockerbridge"
|
||||||
|
if [ -n "${SAMBA_INTERFACE:-}" ]; then
|
||||||
|
interfaces+=",$SAMBA_INTERFACE"
|
||||||
|
fi ;;
|
||||||
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
html "Initializing shared folder..."
|
html "Initializing shared folder..."
|
||||||
|
Loading…
x
Reference in New Issue
Block a user