Menu

#43 /etc/fstab and path with spaces

Feature_Request
closed
MSYS (18)
1
2010-03-08
2004-12-18
No

Hi,

I'm distributing a "dev-pack" (psycle project at
sourceforge) which contains msys with a modified
"startup script" that automatically produce a
/etc/fstab file with the /home mount point set with the
parent dir of the USERPROFILE env var.

the problem is that the parent dir the of USERPROFILE
is usually something like "x:/documents and settings",
i.e. the path contains spaces.

i've tried quoting with " or ', but it seems the syntax
is rejected.

Alternatively, is there a way with cmd.exe to obtain
the "8.3" alias for a path?

Regards,

Johan.

Discussion

  • Johan Boulé

    Johan Boulé - 2004-12-18

    Logged In: YES
    user_id=96100

    Ok, i found a work around to get the 8.3 alias of the dir..
    it's quite a horrible cmd.exe's shell code:

    pushd "%USERPROFILE%" || goto :failed
    cd .. || goto :failed
    for %%X in \("%CD%"\) do set X=%%~sX|| goto :failed
    echo %X% /home >> "%~d0%~p0msys\etc\fstab" || goto :failed
    set X=
    popd || goto :failed
    

    the %~sX converts the content of the X var to 8.3 style
    alias, and since this feature only works for 'for'
    variables, we need to use a 'for' command... ugly ugly :/

     
  • Johan Boulé

    Johan Boulé - 2004-12-18

    Logged In: YES
    user_id=96100

    On a side note, i see that msys\bin is mounted on /usr/bin,
    but since msys is already mouned on /usr, it's useless.

     
  • Johan Boulé

    Johan Boulé - 2004-12-18
    • priority: 5 --> 1
     
  • Luke Dunstan

    Luke Dunstan - 2004-12-19

    Logged In: YES
    user_id=30442

    I don't see any "/usr/bin" in my mount table

     
  • Earnie Boyd

    Earnie Boyd - 2004-12-19

    Logged In: YES
    user_id=15438

    The 1.0.11 version removes the /usr/bin mount point.

    Use the /X option of dir to obtain the 8.3 version of the
    filename.

    Spaces in file names in /etc/fstab is not a concern of mine.
    If someone wants to submit a patch to use quotes then I'll
    accept it.

     
  • Earnie Boyd

    Earnie Boyd - 2004-12-19
    • milestone: 102880 -->
    • labels: 380073 -->
    • status: open --> closed
     
  • Earnie Boyd

    Earnie Boyd - 2004-12-19
    • labels: --> MSYS
    • milestone: --> Feature_Request
     
  • Earnie Boyd

    Earnie Boyd - 2010-02-05

    Assigning to current maintainer.

     
  • Earnie Boyd

    Earnie Boyd - 2010-02-05
    • assigned_to: earnie --> cstrauss
    • status: closed --> pending
     
  • SourceForge Robot

    This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 30 days (the time period specified by
    the administrator of this Tracker).

     
  • SourceForge Robot

    • status: pending --> closed