mirror of
https://github.com/dockur/windows.git
synced 2025-10-26 19:05:49 +00:00
feat: Support more network types (#1453)
This commit is contained in:
parent
b3f1cb913a
commit
17db1ac34c
1 changed files with 14 additions and 14 deletions
28
src/samba.sh
28
src/samba.sh
|
|
@ -12,23 +12,23 @@ rm -rf /var/run/wsdd.pid
|
|||
[[ "$SAMBA" == [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
|
||||
hostname="$IP"
|
||||
interfaces="$VM_NET_DEV"
|
||||
fi
|
||||
|
||||
if [[ "${NETWORK,,}" == "user"* ]]; then
|
||||
interfaces="lo"
|
||||
if ! ip link set "$interfaces" multicast on >/dev/null; then
|
||||
warn "Failed to enable multicast on loopback interface!"
|
||||
fi
|
||||
else
|
||||
hostname="host.lan"
|
||||
case "${NETWORK,,}" in
|
||||
"user"* | "passt" | "slirp" )
|
||||
interfaces="lo"
|
||||
if ! ip link set "$interfaces" multicast on >/dev/null; then
|
||||
warn "Failed to enable multicast on loopback interface!"
|
||||
fi ;;
|
||||
*)
|
||||
interfaces="dockerbridge"
|
||||
if [ -n "${SAMBA_INTERFACE:-}" ]; then
|
||||
interfaces+=",$SAMBA_INTERFACE"
|
||||
fi ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
html "Initializing shared folder..."
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue