fix: Folder sharing on XP and Vista (#313)

This commit is contained in:
Kroese 2024-03-26 02:28:13 +01:00 committed by GitHub
parent ab6ba410b3
commit 3a871e4ac5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 24 additions and 4 deletions

View File

@ -3,6 +3,8 @@ services:
windows: windows:
image: dockurr/windows image: dockurr/windows
container_name: windows container_name: windows
environment:
VERSION: "win11"
devices: devices:
- /dev/kvm - /dev/kvm
cap_add: cap_add:

View File

@ -29,6 +29,8 @@ services:
windows: windows:
image: dockurr/windows image: dockurr/windows
container_name: windows container_name: windows
environment:
VERSION: "win11"
devices: devices:
- /dev/kvm - /dev/kvm
cap_add: cap_add:

View File

@ -23,7 +23,7 @@ SAMBA="/etc/samba/smb.conf"
echo " security = user" echo " security = user"
echo " guest account = nobody" echo " guest account = nobody"
echo " map to guest = Bad User" echo " map to guest = Bad User"
echo " server min protocol = SMB2" echo " server min protocol = NT1"
echo "" echo ""
echo " # disable printing services" echo " # disable printing services"
echo " load printers = no" echo " load printers = no"
@ -41,7 +41,7 @@ SAMBA="/etc/samba/smb.conf"
echo " force group = root" echo " force group = root"
} > "$SAMBA" } > "$SAMBA"
{ echo "--------------------------------------------------------" { echo "--------------------------------------------------------"
echo " $APP for Docker v$(</run/version)..." echo " $APP for Docker v$(</run/version)..."
echo " For support visit $SUPPORT" echo " For support visit $SUPPORT"
echo "--------------------------------------------------------" echo "--------------------------------------------------------"
@ -61,7 +61,23 @@ SAMBA="/etc/samba/smb.conf"
echo "" echo ""
} | unix2dos > "$SHARE/readme.txt" } | unix2dos > "$SHARE/readme.txt"
smbd -D ! smbd && smbd --debug-stdout
wsdd -i dockerbridge -p -n "host.lan" &
isXP="N"
if [ -f "$STORAGE/windows.old" ]; then
MT=$(<"$STORAGE/windows.old")
if [[ "${MT,,}" == "pc-q35-2"* ]]; then
isXP="Y"
fi
fi
if [[ "$isXP" == [Yy1]* ]]; then
# Enable NetBIOS on Windows XP
! nmbd && nmbd --debug-stdout
else
# Enable Web Service Discovery
wsdd -i dockerbridge -p -n "host.lan" &
fi
return 0 return 0