mirror of
https://github.com/dockur/windows.git
synced 2025-04-05 08:22:02 +00:00
Update samba.sh
This commit is contained in:
parent
c83c993a43
commit
02d1150795
@ -15,8 +15,7 @@ if [[ "$DHCP" == [Yy1]* ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "${NETWORK,,}" == "user"* ]]; then
|
if [[ "${NETWORK,,}" == "user"* ]]; then
|
||||||
hostname="$IP"
|
interface="127.0.0.1"
|
||||||
interface="$VM_NET_DEV"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
addShare() {
|
addShare() {
|
||||||
@ -112,8 +111,14 @@ done
|
|||||||
if ! smbd; then
|
if ! smbd; then
|
||||||
error "Samba daemon failed to start!"
|
error "Samba daemon failed to start!"
|
||||||
smbd -i --debug-stdout || true
|
smbd -i --debug-stdout || true
|
||||||
|
else
|
||||||
|
if [[ "${NETWORK,,}" == "user"* ]]; then
|
||||||
|
NET_OPTS="${NET_OPTS/,hostfwd/,guestfwd=tcp:${VM_NET_IP%.*}.1:445-tcp:127.0.0.1:445,hostfwd}"
|
||||||
|
fi
|
||||||
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
|
||||||
if ! nmbd; then
|
if ! nmbd; then
|
||||||
|
Loading…
Reference in New Issue
Block a user