rc.local does not appear to execute during boot

rc.local does not appear to execute during boot

Post by Bill » Sun, 31 Dec 1899 09:00:00



Hello,

I am a newbie, just installed RH 7.  Trying to learn how to configure
system.

I have added a call to a script inside the /etc/rc.d/rc.local file.  This
script sets up ip forwarding and masquerading for the firewall.  After I
reboot my computers on the local network can't get out through the firewall.
I believe the problem is that rc.local is not be executed.  I came to this
conclusion because I can execute the rc.local file by typing ./rc.local and
then my computers on the local network can get through the firewall.

Why isn't rc.local being executed during boot?

Thanks in advance; many more questions to come.

Randy

 
 
 

rc.local does not appear to execute during boot

Post by Hal Burgi » Sun, 31 Dec 1899 09:00:00



>I am a newbie, just installed RH 7.  Trying to learn how to configure
>system.

>I have added a call to a script inside the /etc/rc.d/rc.local file.  This
>script sets up ip forwarding and masquerading for the firewall.  After I
>reboot my computers on the local network can't get out through the firewall.
>I believe the problem is that rc.local is not be executed.  I came to this
>conclusion because I can execute the rc.local file by typing ./rc.local and
>then my computers on the local network can get through the firewall.

>Why isn't rc.local being executed during boot?

A couple of things to check...make sure it is scheduled to start:


lrwxrwxrwx 1 root root   11 May 17 18:16 /etc/rc.d/rc5.d/S99local ->../rc.local

rc5.d is runlevel 5 (X) stuff. 'S' means to be started (K would indicate
to be killed). 99 makes it last thing run at this runlevel. Of course,
make sure the link is there. Use 'ntsysv' as root to change if not set
to run. Also, make sure the permission are correct on
/etc/rc.d/rc.local. Should be 'rwx'. Note the 'x' there. Also, use full
path names for any scripts or executables that are run from here in case
they are not in the default path.

--
Hal B



--

 
 
 

rc.local does not appear to execute during boot

Post by Bill » Sun, 31 Dec 1899 09:00:00


Thanks Hal,

It was the fact that I was using a relative path within rc.local.  Works
great now.

Thanks Randy



> >I am a newbie, just installed RH 7.  Trying to learn how to configure
> >system.

> >I have added a call to a script inside the /etc/rc.d/rc.local file.  This
> >script sets up ip forwarding and masquerading for the firewall.  After I
> >reboot my computers on the local network can't get out through the
firewall.
> >I believe the problem is that rc.local is not be executed.  I came to
this
> >conclusion because I can execute the rc.local file by typing ./rc.local
and
> >then my computers on the local network can get through the firewall.

> >Why isn't rc.local being executed during boot?

> A couple of things to check...make sure it is scheduled to start:


> lrwxrwxrwx 1 root root   11 May 17 18:16

/etc/rc.d/rc5.d/S99local ->../rc.local

- Show quoted text -

> rc5.d is runlevel 5 (X) stuff. 'S' means to be started (K would indicate
> to be killed). 99 makes it last thing run at this runlevel. Of course,
> make sure the link is there. Use 'ntsysv' as root to change if not set
> to run. Also, make sure the permission are correct on
> /etc/rc.d/rc.local. Should be 'rwx'. Note the 'x' there. Also, use full
> path names for any scripts or executables that are run from here in case
> they are not in the default path.

> --
> Hal B



> --

 
 
 

1. rc.local and rc.sysinit don't execute mount

Hi all,

I have a partially working Samba connection to my WinXP box.  Until I
get the time to smooth everything out, I'm happy just having access to
my mp3s.  This is the line in fstab:

//HOMER/ddrive         /usr/media/sound/mp3s   smbfs  \
        ip=192.168.0.1,workgroup=MYGROUP,guest,rw 0 0

When I type in "mount/usr/media/sound/mp3s" as root in a shell,
everything goes fine.  But if I put the same line in rc.sysinit or
rc.local, it either isn't executed or it doesn't work.  Anyone know why?

Note that other commands in the rc files work fine, which would support
the assumption that the mount is executed but something fails.  But I
can do the mount fine from a root shell manually, which would support
the assumption that the mount isn't executed.  Which leaves nothing to
go on.

By the way it's a RH 7.2 system with the custom HPT 372 RAID controller
kernel from HighPoint.

Regards,
Mladen

2. FreeBSD 4.5 - no /boot/loader error! Need help!

3. rc.local partially executing at boot ...

4. Mediavision Reno

5. Permission Denied!!! rc.local execute at boot up.

6. cygwin help!

7. Boot problem: " cannot execute "/etc/rc.d/rc.S" "

8. SLS Experiences

9. prob w/ /etc/rc.d/rc.local - wont boot

10. Not executing rc files properly when booting...

11. *** rc.local not being read on boot-up ***

12. How to run something in rc.local not as root when booting.

13. which user does /etc/rc.d/rc.local / rc.sysinit run as?