Amiga.org

Amiga computer related discussion => Amiga Software Issues and Discussion => Topic started by: Coolit on January 18, 2006, 08:15:19 PM

Title: Mounting A Samba Share on/just after boot
Post by: Coolit on January 18, 2006, 08:15:19 PM
Hi,

I've setup samba and it's all working great, when I want to mount a share I simply do "c:mount mymountlist" and it mounts the drive I've setup in the mount list. Taking it a stage further I'd like it to auto mount after Workbench loads for convenience.

So far I've tried adding a line after the command to load workbench in the SS which didn't do it, I've tried popping the script into WBStartup after making it executable (a pitiful attempt I know) and that didn't work.

Any ideas??? is it possible???

Thanks in advance :-)
Title: Re: Mounting A Samba Share on/just after boot
Post by: Thomas on January 18, 2006, 09:50:04 PM

Startup-Sequence is taboo, don't touch it ! The correct place for customisations is User-Startup.

However, mounting a share is better synchronised with the TCP/IP stack because trying to mount it before TCP/IP is online will fail. Depending on the stack you use there are different places to add scripts to events. Check your TCP/IP prefs.

According to my experience, you better delay the mounting of shares a little bit after going online. So to the online event add something like "run >nil: execute s:online_script" and in s:online_script you do this:

wait 1
mount myshare:

Bye,
Thomas
Title: Re: Mounting A Samba Share on/just after boot
Post by: Thomas on January 18, 2006, 09:52:27 PM

BTW, to run a script from WBStartup, you have to give it an icon. Create or copy a project icon, then open its icon information and change the default tool to c:iconx.

Bye,
Thomas
Title: Re: Mounting A Samba Share on/just after boot
Post by: ChaosLord on January 18, 2006, 10:49:21 PM
Are you using Miami or Genesis or ???
Title: Re: Mounting A Samba Share on/just after boot
Post by: Coolit on January 18, 2006, 10:52:57 PM
Thanks for the reply ! Im 50% there.

Ive added the line into Genesis and that part works fine. If I add "wait 1" to the script (line 1) I get an error "unknown command line 1". If I remove "wait 1" I get an error that says the share cant be connected, so I know its the wait command thats doing it, and also that I do need some form of wait command in there.
Title: Re: Mounting A Samba Share on/just after boot
Post by: Coolit on January 19, 2006, 05:15:11 PM
I guess the question is now, which command can I use to delay the mount process, i.e. what do I put at the start of the mountlist?
Title: Re: Mounting A Samba Share on/just after boot
Post by: Piru on January 19, 2006, 05:20:11 PM
@Coolit

I believe you're a bit confused.

You're not to edit the mountfile, but create a script that is executed. In this script you use AmigaDOS command 'Wait' to delay a bit before using another AmigaDOS command 'Mount' to mount the share.

Just follow the advice Thomas gave before.
Title: Re: Mounting A Samba Share on/just after boot
Post by: Coolit on January 19, 2006, 06:36:44 PM
Ahh you were right Piru, read the instructions again and all is working great now, thanks!  :-)
Title: Re: Mounting A Samba Share on/just after boot
Post by: mgerics on January 19, 2006, 08:37:46 PM
Why not use SWAT? If you installed samba correctly, I believe you just need to use SWAT to set up local shares:
in a browse on your Amiga goto http://localhost:901
Pick the shares option then select the directory/drie you want to share.

Don't quote me, 'cause I had a bear of a time getting the thing to work anyway! But, I can share out my Miggy drives...
Title: Re: Mounting A Samba Share on/just after boot
Post by: Thomas on January 19, 2006, 09:08:35 PM
@mgerics: he does not want to change local shares but he wants to access remote shares. You cannot use SWAT to do that, you need SMB-Connect or SMBFS. The former works with a mountlist which has to be activated by the mount command.

Bye,
Thomas
Title: Re: Mounting A Samba Share on/just after boot
Post by: mgerics on January 19, 2006, 09:26:16 PM
Oops, my bad. Sorry, listen to Thomas, not me.
Title: Re: Mounting A Samba Share on/just after boot
Post by: Coolit on January 19, 2006, 09:31:38 PM
hehe,

SWAT works fine although Ive not played about with it much yet on the Amiga.
I have used it before under linux a number of times although I cant see me wanting to share the amiga HDDs out.