mirror of
https://github.com/dockur/windows.git
synced 2025-10-28 03:45:48 +00:00
feat: Disable NetBIOS if user-mode networking
This commit is contained in:
parent
77480804ef
commit
5659082f99
1 changed files with 9 additions and 11 deletions
20
src/samba.sh
20
src/samba.sh
|
|
@ -134,6 +134,8 @@ if [[ "$SAMBA_DEBUG" == [Yy1]* ]]; then
|
||||||
smbd -i -d "$SAMBA_LEVEL" --debug-stdout &
|
smbd -i -d "$SAMBA_LEVEL" --debug-stdout &
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
[[ "${NETWORK,,}" == "user"* ]] && return 0
|
||||||
|
|
||||||
if [[ "${BOOT_MODE:-}" == "windows_legacy" ]]; then
|
if [[ "${BOOT_MODE:-}" == "windows_legacy" ]]; then
|
||||||
|
|
||||||
# Enable NetBIOS on Windows 7 and lower
|
# Enable NetBIOS on Windows 7 and lower
|
||||||
|
|
@ -151,18 +153,14 @@ if [[ "${BOOT_MODE:-}" == "windows_legacy" ]]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
|
# Enable Web Service Discovery on Vista and up
|
||||||
|
[[ "$DEBUG" == [Yy1]* ]] && echo "Starting Web Service Discovery daemon..."
|
||||||
|
|
||||||
if [[ "${NETWORK,,}" != "user"* ]]; then
|
if [[ "$SAMBA_DEBUG" != [Yy1]* ]]; then
|
||||||
|
wsddn -i "$interface" -H "$hostname" --unixd --pid-file=/var/run/wsdd.pid
|
||||||
# Enable Web Service Discovery on Vista and up
|
else
|
||||||
[[ "$DEBUG" == [Yy1]* ]] && echo "Starting Web Service Discovery daemon..."
|
wsddn -i "$interface" -H "$hostname" --pid-file=/var/run/wsdd.pid &
|
||||||
|
|
||||||
if [[ "$SAMBA_DEBUG" != [Yy1]* ]]; then
|
|
||||||
wsddn -i "$interface" -H "$hostname" --unixd --pid-file=/var/run/wsdd.pid
|
|
||||||
else
|
|
||||||
wsddn -i "$interface" -H "$hostname" --pid-file=/var/run/wsdd.pid &
|
|
||||||
fi
|
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue