1 #!/bin/sh /usr/share/dpatch/dpatch-run
2 ## 069_support_spaces_in_smb_share_names.dpatch
8 diff -Naur .B/samples/auto.smb .A/samples/auto.smb
9 --- .B/samples/auto.smb 2005-04-05 13:02:09.000000000 +0000
10 +++ .A/samples/auto.smb 2007-01-07 21:36:36.000000000 +0000
13 $SMBCLIENT -gNL $key 2>/dev/null| awk -v key="$key" -v opts="$opts" -F'|' -- '
14 BEGIN { ORS=""; first=1 }
15 - /Disk/ { if (first) { print opts; first=0 }; print " \\\n\t /" $2, "://" key "/" $2 }
16 + /Disk/ { if (first) { print opts; first=0 }; sub(/ /, "\\ ", $2); print " \\\n\t /" $2, "://" key "/" $2 }
17 END { if (!first) print "\n"; else exit 1 }