fix: Use NetBIOS on i440fx machines

This commit is contained in:
Kroese 2024-05-28 18:20:27 +02:00 committed by GitHub
parent 4ed3437983
commit fa3b17e871
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 5 deletions

View File

@ -72,19 +72,20 @@ mkdir -p "$share"
! smbd && smbd --debug-stdout ! smbd && smbd --debug-stdout
legacy="N" legacy=""
if [ -f "$STORAGE/windows.old" ]; then if [ -f "$STORAGE/windows.old" ]; then
MT=$(<"$STORAGE/windows.old") MT=$(<"$STORAGE/windows.old")
[[ "${MT,,}" == "pc-q35-2"* ]] && legacy="Y" [[ "${MT,,}" == "pc-q35-2"* ]] && legacy="y"
[[ "${MT,,}" == "pc-i440fx-2"* ]] && legacy="y"
fi fi
if [[ "$legacy" == [Yy1]* ]]; then if [ -n "$legacy" ]; then
[[ "$DHCP" == [Yy1]* ]] && return 0 [[ "$DHCP" == [Yy1]* ]] && return 0
# Enable NetBIOS on Windows XP # Enable NetBIOS on Windows XP and lower
! nmbd && nmbd --debug-stdout ! nmbd && nmbd --debug-stdout
else else
# Enable Web Service Discovery # Enable Web Service Discovery on Vista and up
wsdd -i "$interface" -p -n "$hostname" & wsdd -i "$interface" -p -n "$hostname" &
echo "$!" > /var/run/wsdd.pid echo "$!" > /var/run/wsdd.pid
fi fi