rc.local doesn't run at startup ?
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Unix and Linux reviews > Red Hat support > Red Hat Topics > rc.local doesn't run at startup ?




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    rc.local doesn't run at startup ?  
McHenry


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
05-31-06 06:12 PM

My runlevel is 3 as specified in /etc/inittab:
id:3:initdefault:

I would like to run the fetchmail deamon at startup and have added a simple
line in rc.local to do so. When the machine boots, not mail is delivered and
if I check the processes running using "ps -ef" fetchmail is not listed.
However after bootup if I manually run /etc/rc.d/./rc.local the mail is
delivered and "ps -ef" lists the fetchmail daemon command.

[root@declan rc.d]# ls -l
total 112
drwxr-xr-x  2 root root  4096 May 26 19:59 init.d
-rwxr-xr-x  1 root root  2352 Mar 17  2004 rc
drwxr-xr-x  2 root root  4096 May 30 21:16 rc0.d
drwxr-xr-x  2 root root  4096 May 30 21:16 rc1.d
drwxr-xr-x  2 root root  4096 May 30 21:16 rc2.d
drwxr-xr-x  2 root root  4096 May 31 10:12 rc3.d
drwxr-xr-x  2 root root  4096 May 31 10:12 rc4.d
drwxr-xr-x  2 root root  4096 May 31 10:12 rc5.d
drwxr-xr-x  2 root root  4096 May 30 21:16 rc6.d
-rwxr-xr-x  1 root root   243 May 31 19:07 rc.local
-rwxr-xr-x  1 root root 27517 Mar  9 11:35 rc.sysinit
[root@declan rc.d]#


What is going on ?







[ Post a follow-up to this message ]



    Re: rc.local doesn't run at startup ?  
Greg Hackney


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
05-31-06 06:12 PM

McHenry wrote:
> My runlevel is 3 as specified in /etc/inittab:
> id:3:initdefault:
>
> I would like to run the fetchmail deamon at startup and have added a simpl
e
> line in rc.local to do so. When the machine boots, not mail is delivered a
nd
> if I check the processes running using "ps -ef" fetchmail is not listed.
> However after bootup if I manually run /etc/rc.d/./rc.local the mail is
> delivered and "ps -ef" lists the fetchmail daemon command.
>
> [root@declan rc.d]# ls -l
> total 112
> drwxr-xr-x  2 root root  4096 May 26 19:59 init.d
> -rwxr-xr-x  1 root root  2352 Mar 17  2004 rc
> drwxr-xr-x  2 root root  4096 May 30 21:16 rc0.d
> drwxr-xr-x  2 root root  4096 May 30 21:16 rc1.d
> drwxr-xr-x  2 root root  4096 May 30 21:16 rc2.d
> drwxr-xr-x  2 root root  4096 May 31 10:12 rc3.d
> drwxr-xr-x  2 root root  4096 May 31 10:12 rc4.d
> drwxr-xr-x  2 root root  4096 May 31 10:12 rc5.d
> drwxr-xr-x  2 root root  4096 May 30 21:16 rc6.d
> -rwxr-xr-x  1 root root   243 May 31 19:07 rc.local
> -rwxr-xr-x  1 root root 27517 Mar  9 11:35 rc.sysinit
> [root@declan rc.d]#
>
>
> What is going on ?

You might try temporarily modifying the command to capture the
standard and error output, to see what it complains about. For example:

/usr/bin/fetchmail -d 900 >/tmp/fetchmmail.out 2>&1

--
Greg














[ Post a follow-up to this message ]



    Re: rc.local doesn't run at startup ?  
Moe Trin


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
06-01-06 12:12 AM

On Wed, 31 May 2006, in the Usenet newsgroup comp.os.linux.redhat, in articl
e
<447d9f34$0$7850$5a62ac22@per-qv1-newsreader-01.iinet.net.au>, McHenry wrote
:

>I would like to run the fetchmail deamon at startup and have added a simple
>line in rc.local to do so. When the machine boots, not mail is delivered an
d
>if I check the processes running using "ps -ef" fetchmail is not listed.
>However after bootup if I manually run /etc/rc.d/./rc.local the mail is
>delivered and "ps -ef" lists the fetchmail daemon command.

Neither here, or in comp.mail.sendmail did you include the file so that one
can see your error,  but the usual cause of this exact problem is not puttin
g
the entire PATH to the command in scripts. The boot scripts are normally
executed with a limited environment (including a PATH that only has four
directories in it), which is quite different from your PATH as a user.
For an education, add the line

set > /tmp/boot.environment

to the bottom of rc.local, and after the next boot look at the contents of
that file while comparing the result of you typing the command set as root
and as the user you should be running as.

Standard advice when writing scripts is to either explicitly set the PATH
to that desired, or put the full path to each command.

Old guy





[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 11:34 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register