Click to See Complete Forum and Search --> : startup script for mounting share


antitrustworthy
07-23-2001, 12:44 AM
How do you make something start automatically from bootup. I guess it would be some kind of script. Here's the deal, I want a script that will run the command 'lisa' at startup and 'mount -t smbfs //Dori/C /mnt/server'. If someone could either tell me in detail how to write such a script (I know nothing) or possibly write one for me I would would be your best friend forever. I need to learn how to do this anyway, so whichever way you choose, Im going to learn how to do it myself from whatever course you take. Thanks so much!

evulish
07-23-2001, 12:54 AM
Edit your /etc/fstab. Just use one of the other lines (like /) for a template. Theres a man file for it too, I think.

antitrustworthy
07-23-2001, 01:03 AM
Is there any way you could explain that just a tad better. I looked at /etc/fstab. Everything starts with a "/", which would make me think that I cant just type in my stuff like mount -t smbfs //Dori/C /mnt/server. If you could give me an example line, that would be great.

Iassen
07-23-2001, 02:12 AM
Create a script:
#!/bin/bash
mount -t ..... (type here)

make it executable (chmod ....)

At the end of etc/rc.d/rc.local -
/home/yourname/./yourscriptname

It will run your script at startup