Easy question, I hope
  • Just looking around
    egillskallagrimsson
    Posts: 3 from 2009/11/26
    This is probably a really simple to answer question but I've only just started using Amiga/MorphOS a few months back. I've got smbfs set up and running and was wondering if it's possible to add a command to my user-startup file to auto mount my shares on start up. If so, what's the syntax I should be using to do this? Thanks for any help with this.
  • »26.11.09 - 22:42
    Profile
  • Paladin of the Pegasos
    Paladin of the Pegasos
    tokai
    Posts: 1289 from 2003/2/25
    From: binaryriot
    I personally wouldn't add it to user-startup (you don't know if the TCP/IP srack is online at that point already and waiting for it would delay your boot).

    But you could write a small script like this (replace share/ login information with your information of course) and save it to "SYS:WBStartup". Next you copy some .info file (icon) to this file, e.g. you saved your script as 'MountShare' then you save the icon as 'MountShare.info'. Finally right-click on the icon and choose 'Information...' and switch the icon type to 'Project' and add 'MOSSYS:C/IconX' as 'Default Tool'.

    That way you simple can enable/ disable shares by dragging the script out of WBStartup.



    ; Wait for TCP/IP stack to show up
    ;
    IF NOT EXISTS MOSSYS:s/network-startup
    WaitForPort MIAMI.1 LOOP 10
    ELSE
    WaitForPort NETSTACK LOOP 10
    ENDIF

    ; First start needs some delay, so TCP/IP stack has time to go online
    ;
    IF NOT EXISTS T:SMB1.log
    WAIT 3
    ENDIF

    Date LFORMAT "smbfs for 'data' started at %T %d.%m.%Y" >>T:SMB1.log
    Run <>NIL: smbfs workgroup HOMENET user SECRETAGENT password TOPSECRET devicename SMB1 volumename data@garnet //garnet/data OMITHIDDEN <NIL: >>T:SMB1.log

    EndCLI


    [ Edited by tokai on 2009/11/27 2:32 ]

    [ Edited by tokai on 2009/11/27 2:43 ]
  • »27.11.09 - 01:30
    Profile Visit Website
  • Paladin of the Pegasos
    Paladin of the Pegasos
    tokai
    Posts: 1289 from 2003/2/25
    From: binaryriot
    this 'Run ..... >>T:SMB1.log' stuff is a single line; for some reason it shows up as multiple lines here in IBrowse even I placed it in a code block. MorphZone.org is quite broken.
  • »27.11.09 - 01:34
    Profile Visit Website
  • Just looking around
    egillskallagrimsson
    Posts: 3 from 2009/11/26
    That seems to have worked. Thanks.
  • »27.11.09 - 06:10
    Profile