View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 21 posts ] 
Go to page Previous  1, 2

Print view Previous topic   Next topic  
Author Message
Search for:
 Post subject:
PostPosted: Wed Mar 21, 2007 11:35 pm 
Offline
Joined: Fri Oct 20, 2006 12:04 pm
Posts: 905
Location: LA, CA
slowtolearn wrote:
Too Many Secrets wrote:
No go. It pops the short edition of the man page... I'm googling for more info. Once I find the correct option for the password, do I add to the fstab?

I don't like to use fstab for remote mounts, I prefer to create a file within the /etc/rc5.d directory to handle that for me (old Sys V days, can't get past them!). Be sure to make it executable if you go this route.


OK, so I finally got around to finding a workable option to mount this drive in one line. As I don't have the drive password protected, I can login as 'guest'.

Code:
mount -t cifs 10.0.0.50:/music /music -o guest


But I don't know how to create the /etc/rc5.d file to run this at startup. Also it needs to umount at shutdown or else it hangs. I've googled a few sites and looked at the existing scripts, but it's still not making much sense. Could anyone help me put a bow on this thread and lead me to a workable example?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 22, 2007 5:44 am 
Offline
Joined: Wed Nov 16, 2005 8:55 pm
Posts: 1381
Location: Farmington, MI USA
Here's how I usually do it:

* Edit /etc/rc5.d/S19music and insert the following:
Code:
#!/bin/sh
mount -t cifs 10.0.0.50:/music /music -o guest


* Make /etc/rc5.d/S19music executable:
Code:
chmod 755 /etc/rc5.d/S19music


* To unmount /music at shutdown, edit /etc/rc0.d/K19music and insert
Code:
#!/bin/sh
umount /music


* Make /etc/rc0.d/K19music executable:
Code:
chmod 755 /etc/rc5.d/K19music


Change the filenames if they happen to conflict with existing (doubtful). Now /etc/rc5.d/S19music will mount your network drive on bootup, and /etc/rc0.d/K19music will unmount it at shutdown/reboot.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 22, 2007 7:14 pm 
Offline
Joined: Fri Oct 20, 2006 12:04 pm
Posts: 905
Location: LA, CA
OK it mounts fine <woot>, but it hangs on reboot... which log do I need to look at?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 23, 2007 7:18 am 
Offline
Joined: Wed Nov 16, 2005 8:55 pm
Posts: 1381
Location: Farmington, MI USA
Not sure. Where is it hanging (what do you see on the screen)? To make sure it is getting to the K19music script, add echo "Unmounting music directory" just under the #!/bin/sh line. You may need to add the -f option to umount.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 28, 2007 3:08 pm 
Offline
Joined: Fri Oct 20, 2006 12:04 pm
Posts: 905
Location: LA, CA
After reading thru the /etc/inittab file I copied the above umount file (K19) to the /etc/rc6.d directory and all is well. I can now reboot and shutdown without issue!

Thanks slowtolearn and the rest for the all the assistance!


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 28, 2007 3:32 pm 
Offline
Joined: Wed Nov 16, 2005 8:55 pm
Posts: 1381
Location: Farmington, MI USA
Too Many Secrets wrote:
After reading thru the /etc/inittab file I copied the above umount file (K19) to the /etc/rc6.d directory and all is well. I can now reboot and shutdown without issue!

Thanks slowtolearn and the rest for the all the assistance!
Glad you got it worked out. I didn't know the rc0.d stuff wouldn't work, thanks for that tip.


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 21 posts ] 
Go to page Previous  1, 2



All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu