Re: mounting Win with spaces via samba in fstab
[top-posting corrected] > Matthew Emmerton <[EMAIL PROTECTED]> wrote:> I'm trying to mount a remote Windows directory, which happens to have a > space in its name; "mount -a" returns the following error: > > fstab: /etc/fstab:14: Inappropriate file type or format > > > > I have tried both of the following formats: > > //[EMAIL PROTECTED]/Win\ Partition /mountpoint smbfs rw 0 0 > > "//[EMAIL PROTECTED]/Win Partition" /mountpoint smbfs rw 0 0 > > > > I pulled this format directly from "man mount_smbfs 8": > > "//[EMAIL PROTECTED]/public /smb/public smbfs rw,noauto 0 0" > > > > I searched the archives, and it seems this question had been asked once > before, but no conclusion was reached: > > > http://groups.google.com/groups?hl=en&lr=lang_en&ie=UTF-8&threadm=1042037002.72844.6.camel%40d80h149.public.uconn.edu.lucky.freebsd.questions&rnum=1&prev=/groups%3Fq%3D%2522fstab:%2B/etc/fstab%2522%2B%2522Inappropriate%2Bfile%2Btype%2Bor%2Bformat%2522%2Bsmbfs%26hl%3Den%26lr%3Dlang_en%26ie%3DUTF-8%26selm%3D1042037002.72844.6.camel%2540d80h149.public.uconn.edu.lucky.freebsd.questions%26rnum%3D1 > > I think the problem is that the fstab(5) file format treats spaces as field > delimiters, and the routines used to parse fstab > (/usr/src/lib/libc/gen/fstab.c, fstabscan() in particular) do not know how > to handle escaped spaces nor quoted fields. > > -- > Matt Emmerton > I'm afraid you may be right, Matt. > I found the following in "man fstab 5": > "If a program needs the character special file name, the pro- > gram must create it by appending a ``r'' after the last ``/'' in the spe- > cial file name." > ...but that didn't seem to help. > The mount_smbfs command seems to work fine with the "\ " sequence, but this isn't the case with fstab. > Perhaps if I were instead to include mount_smbfs commands in a script to be run at boot time: > #!/bin/sh > mount_smbfs //[EMAIL PROTECTED]/Win\ Partition /mountpoint > > Is this the proper syntax for a script? And if so, where would I put such a file? > Thank you, > ~John Since this is a script, I'd use judicious use of quotes to protect the shell from messing things up. #!/bin/sh mount_smbfs "//[EMAIL PROTECTED]/Win Partition" /mountpoint You can put a script like this in /usr/local/etc/rc.d, and it will get executed automatically upon boot. -- Matt Emmerton ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: mounting Win with spaces via samba in fstab
I'm afraid you may be right, Matt. I found the following in "man fstab 5": "If a program needs the character special file name, the pro- gram must create it by appending a ``r'' after the last ``/'' in the spe- cial file name." ...but that didn't seem to help. The mount_smbfs command seems to work fine with the "\ " sequence, but this isn't the case with fstab. Perhaps if I were instead to include mount_smbfs commands in a script to be run at boot time: #!/bin/sh mount_smbfs //[EMAIL PROTECTED]/Win\ Partition /mountpoint Is this the proper syntax for a script? And if so, where would I put such a file? Thank you, ~John Matthew Emmerton <[EMAIL PROTECTED]> wrote:> I'm trying to mount a remote Windows directory, which happens to have a space in its name; "mount -a" returns the following error: > fstab: /etc/fstab:14: Inappropriate file type or format > > I have tried both of the following formats: > //[EMAIL PROTECTED]/Win\ Partition /mountpoint smbfs rw 0 0 > "//[EMAIL PROTECTED]/Win Partition" /mountpoint smbfs rw 0 0 > > I pulled this format directly from "man mount_smbfs 8": > "//[EMAIL PROTECTED]/public /smb/public smbfs rw,noauto 0 0" > > I searched the archives, and it seems this question had been asked once before, but no conclusion was reached: > http://groups.google.com/groups?hl=en&lr=lang_en&ie=UTF-8&threadm=1042037002.72844.6.camel%40d80h149.public.uconn.edu.lucky.freebsd.questions&rnum=1&prev=/groups%3Fq%3D%2522fstab:%2B/etc/fstab%2522%2B%2522Inappropriate%2Bfile%2Btype%2Bor%2Bformat%2522%2Bsmbfs%26hl%3Den%26lr%3Dlang_en%26ie%3DUTF-8%26selm%3D1042037002.72844.6.camel%2540d80h149.public.uconn.edu.lucky.freebsd.questions%26rnum%3D1 I think the problem is that the fstab(5) file format treats spaces as field delimiters, and the routines used to parse fstab (/usr/src/lib/libc/gen/fstab.c, fstabscan() in particular) do not know how to handle escaped spaces nor quoted fields. -- Matt Emmerton - Do you Yahoo!? Free online calendar with sync to Outlook(TM). ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: mounting Win with spaces via samba in fstab
> I'm trying to mount a remote Windows directory, which happens to have a space in its name; "mount -a" returns the following error: > fstab: /etc/fstab:14: Inappropriate file type or format > > I have tried both of the following formats: > //[EMAIL PROTECTED]/Win\ Partition /mountpoint smbfs rw 0 0 > "//[EMAIL PROTECTED]/Win Partition" /mountpoint smbfs rw 0 0 > > I pulled this format directly from "man mount_smbfs 8": > "//[EMAIL PROTECTED]/public/smb/public smbfs rw,noauto 0 0" > > I searched the archives, and it seems this question had been asked once before, but no conclusion was reached: > http://groups.google.com/groups?hl=en&lr=lang_en&ie=UTF-8&threadm=1042037002.72844.6.camel%40d80h149.public.uconn.edu.lucky.freebsd.questions&rnum=1&prev=/groups%3Fq%3D%2522fstab:%2B/etc/fstab%2522%2B%2522Inappropriate%2Bfile%2Btype%2Bor%2Bformat%2522%2Bsmbfs%26hl%3Den%26lr%3Dlang_en%26ie%3DUTF-8%26selm%3D1042037002.72844.6.camel%2540d80h149.public.uconn.edu.lucky.freebsd.questions%26rnum%3D1 I think the problem is that the fstab(5) file format treats spaces as field delimiters, and the routines used to parse fstab (/usr/src/lib/libc/gen/fstab.c, fstabscan() in particular) do not know how to handle escaped spaces nor quoted fields. -- Matt Emmerton ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
mounting Win with spaces via samba in fstab
I'm trying to mount a remote Windows directory, which happens to have a space in its name; "mount -a" returns the following error: fstab: /etc/fstab:14: Inappropriate file type or format I have tried both of the following formats: //[EMAIL PROTECTED]/Win\ Partition /mountpoint smbfs rw 0 0 "//[EMAIL PROTECTED]/Win Partition" /mountpoint smbfs rw 0 0 I pulled this format directly from "man mount_smbfs 8": "//[EMAIL PROTECTED]/public/smb/public smbfs rw,noauto 0 0" I searched the archives, and it seems this question had been asked once before, but no conclusion was reached: http://groups.google.com/groups?hl=en&lr=lang_en&ie=UTF-8&threadm=1042037002.72844.6.camel%40d80h149.public.uconn.edu.lucky.freebsd.questions&rnum=1&prev=/groups%3Fq%3D%2522fstab:%2B/etc/fstab%2522%2B%2522Inappropriate%2Bfile%2Btype%2Bor%2Bformat%2522%2Bsmbfs%26hl%3Den%26lr%3Dlang_en%26ie%3DUTF-8%26selm%3D1042037002.72844.6.camel%2540d80h149.public.uconn.edu.lucky.freebsd.questions%26rnum%3D1 Thanks. John DeStefano 9 Lindell Ave Lake Grove, NY 11755 DAY: 516-677-1157 EVE: 631-737-2245 - Do you Yahoo!? Free online calendar with sync to Outlook(TM). ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"