LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora (https://www.linuxquestions.org/questions/fedora-35/)
-   -   Rc.local not woking in Fedora 10 (https://www.linuxquestions.org/questions/fedora-35/rc-local-not-woking-in-fedora-10-a-689736/)

gfem 12-10-2008 10:47 PM

Rc.local not woking in Fedora 10
 
I have modified my rc.local to mount some samba shares, but it does not seem to be running at boot. The same script works great in Centos5. There are no errors in /var/log/messages. If I run the script manually as root it works fine ./rc.local. Can someone tell me how to troubleshoot this problem.

Thanks.

-Gregg

repo 12-11-2008 03:18 AM

Make sure you have the whole path to all of the commands.

gfem 12-11-2008 10:01 AM

I have the complete path in rc.local as follows.....

/bin/mount -t cifs //xxx.xxx.xxx.xxx/entertain/ /entertain -o rw,username=xxxx,password=xxx
/bin/mount -t cifs //xxx.xxx.xxx.xxx/disk/ /disk -o rw,username=xxx,password=xxx

is there a log file somewhere to tell if it is being executed?? Maybe I should mention it is x_64 kernel dunno if it makes a difference.

-Gregg

repo 12-11-2008 10:08 AM

perhaps the connection is not up, at the moment rc.local is executed?
you can add
ping xxx.xxx.xxx.xxx > test.txt
to verify

gfem 12-11-2008 10:20 AM

You are right. I think it is not up I found this in dmesg

CIFS VFS: Error connecting to IPv4 socket. Aborting operation
CIFS VFS: cifs_mount failed w/return code = -101
CIFS VFS: Error connecting to IPv4 socket. Aborting operation
CIFS VFS: cifs_mount failed w/return code = -101

How do I check if the network connection is up within rc.local and tell it to wait for it to come up before executing the commands??

-Gregg

repo 12-11-2008 10:24 AM

you can put the script in
/etc/network/if-up.d/
(this is for debian, perhaps for fedora the location is different)

gfem 12-11-2008 10:40 AM

I did a find for the below in fedora, but it does not exist under that name.
Quote:

Originally Posted by repo (Post 3371822)
you can put the script in
/etc/network/if-up.d/
(this is for debian, perhaps for fedora the location is different)

I ended up band aiding it with /bin/sleep 10. It is kind of annoying, but it works for now. I will do some more research to try to find a better way.

Thanks for the advice.

-Gregg

lheldwein 01-20-2009 04:50 PM

Quote:

Originally Posted by gfem (Post 3371837)
I did a find for the below in fedora, but it does not exist under that name.


I ended up band aiding it with /bin/sleep 10. It is kind of annoying, but it works for now. I will do some more research to try to find a better way.

Thanks for the advice.

-Gregg

Could you tell me how you band aided it with /bin/sleep 10??? I am using Fedora and having the same problem. I would like to be able to do the temporary fix you have done.

Thanks,
Laura


All times are GMT -5. The time now is 09:25 PM.