Welcome, Guest. Please login or register.

Author Topic: Mounting A Samba Share on/just after boot  (Read 2024 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline CoolitTopic starter

  • Sr. Member
  • ****
  • Join Date: Feb 2005
  • Posts: 267
    • Show only replies by Coolit
Mounting A Samba Share on/just after boot
« 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 :-)
[color=0066FF]The System:[/color][/u]

A1200/DBOX - B1260/SCSI/198MB Mediator/Voodoo5500/SB128/100NIC/SpiderII FAST ATA Mk3/SCSI Adapter/PC KEY - IDE DVD/SCSI CDRW/80GB IDE HDD/9GIG 10k SCSI HDD - 3.1 ROMS/OS 3.9 - Logitech KB + MX1000 Mouse
 

Offline Thomas

Re: Mounting A Samba Share on/just after boot
« Reply #1 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

Offline Thomas

Re: Mounting A Samba Share on/just after boot
« Reply #2 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

Offline ChaosLord

  • Hero Member
  • *****
  • Join Date: Nov 2003
  • Posts: 2608
    • Show only replies by ChaosLord
    • http://totalchaoseng.dbv.pl/news.php
Re: Mounting A Samba Share on/just after boot
« Reply #3 on: January 18, 2006, 10:49:21 PM »
Are you using Miami or Genesis or ???
Wanna try a wonderfull strategy game with lots of handdrawn anims,
Magic Spells and Monsters, Incredible playability and lastability,
English speech, etc. Total Chaos AGA
 

Offline CoolitTopic starter

  • Sr. Member
  • ****
  • Join Date: Feb 2005
  • Posts: 267
    • Show only replies by Coolit
Re: Mounting A Samba Share on/just after boot
« Reply #4 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.
[color=0066FF]The System:[/color][/u]

A1200/DBOX - B1260/SCSI/198MB Mediator/Voodoo5500/SB128/100NIC/SpiderII FAST ATA Mk3/SCSI Adapter/PC KEY - IDE DVD/SCSI CDRW/80GB IDE HDD/9GIG 10k SCSI HDD - 3.1 ROMS/OS 3.9 - Logitech KB + MX1000 Mouse
 

Offline CoolitTopic starter

  • Sr. Member
  • ****
  • Join Date: Feb 2005
  • Posts: 267
    • Show only replies by Coolit
Re: Mounting A Samba Share on/just after boot
« Reply #5 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?
[color=0066FF]The System:[/color][/u]

A1200/DBOX - B1260/SCSI/198MB Mediator/Voodoo5500/SB128/100NIC/SpiderII FAST ATA Mk3/SCSI Adapter/PC KEY - IDE DVD/SCSI CDRW/80GB IDE HDD/9GIG 10k SCSI HDD - 3.1 ROMS/OS 3.9 - Logitech KB + MX1000 Mouse
 

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show only replies by Piru
    • http://www.iki.fi/sintonen/
Re: Mounting A Samba Share on/just after boot
« Reply #6 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.
 

Offline CoolitTopic starter

  • Sr. Member
  • ****
  • Join Date: Feb 2005
  • Posts: 267
    • Show only replies by Coolit
Re: Mounting A Samba Share on/just after boot
« Reply #7 on: January 19, 2006, 06:36:44 PM »
Ahh you were right Piru, read the instructions again and all is working great now, thanks!  :-)
[color=0066FF]The System:[/color][/u]

A1200/DBOX - B1260/SCSI/198MB Mediator/Voodoo5500/SB128/100NIC/SpiderII FAST ATA Mk3/SCSI Adapter/PC KEY - IDE DVD/SCSI CDRW/80GB IDE HDD/9GIG 10k SCSI HDD - 3.1 ROMS/OS 3.9 - Logitech KB + MX1000 Mouse
 

Offline mgerics

  • Sr. Member
  • ****
  • Join Date: Jun 2002
  • Posts: 294
    • Show only replies by mgerics
Re: Mounting A Samba Share on/just after boot
« Reply #8 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...
 

Offline Thomas

Re: Mounting A Samba Share on/just after boot
« Reply #9 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

Offline mgerics

  • Sr. Member
  • ****
  • Join Date: Jun 2002
  • Posts: 294
    • Show only replies by mgerics
Re: Mounting A Samba Share on/just after boot
« Reply #10 on: January 19, 2006, 09:26:16 PM »
Oops, my bad. Sorry, listen to Thomas, not me.
 

Offline CoolitTopic starter

  • Sr. Member
  • ****
  • Join Date: Feb 2005
  • Posts: 267
    • Show only replies by Coolit
Re: Mounting A Samba Share on/just after boot
« Reply #11 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.
[color=0066FF]The System:[/color][/u]

A1200/DBOX - B1260/SCSI/198MB Mediator/Voodoo5500/SB128/100NIC/SpiderII FAST ATA Mk3/SCSI Adapter/PC KEY - IDE DVD/SCSI CDRW/80GB IDE HDD/9GIG 10k SCSI HDD - 3.1 ROMS/OS 3.9 - Logitech KB + MX1000 Mouse