* Problem starting programs from rc.local
@ 1994-09-12 14:16 Cormack Andrew
1994-09-12 15:54 ` David Boyce
0 siblings, 1 reply; 2+ messages in thread
From: Cormack Andrew @ 1994-09-12 14:16 UTC (permalink / raw)
I'm trying to start a home-made daemon program as part of the boot
sequence. I've added the necessary command to run the program in the
background to the /sbin/init.d/rc.local script as:
/usr/local/bin/registerd >> /var/adm/registerd.log 2>&1 &
Testing this by running rc.local at a shell prompt works fine: the daemon
buries itself in the background and waits to be called. When the script is
run on reboot, however, there is no sign of the daemon, nor any error
messages to indicate what went wrong. Worse, if I replace the daemon program
by a program which does nothing but sleep for two hours and run this as
/usr/local/bin/sleepy &
this also vanishes.
Can anyone suggest what I am doing wrong ?
Thanks, Andrew
+-----------------------------------------------------------------+
| Andrew Cormack | email: cormack@cardiff.ac.uk |
| Systems Programmer | snail: 40/41 Park Place, Cardiff |
| University of Wales, Cardiff | |
+-----------------------------------------------------------------+
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: Problem starting programs from rc.local
1994-09-12 14:16 Problem starting programs from rc.local Cormack Andrew
@ 1994-09-12 15:54 ` David Boyce
0 siblings, 0 replies; 2+ messages in thread
From: David Boyce @ 1994-09-12 15:54 UTC (permalink / raw)
In article <1994Sep12.141637.19191@cm.cf.ac.uk> scoanc@compu010.cf.ac.uk (Cormack Andrew) writes:
> I'm trying to start a home-made daemon program as part of the boot
> sequence. I've added the necessary command to run the program in the
> background to the /sbin/init.d/rc.local script as:
>
> /usr/local/bin/registerd >> /var/adm/registerd.log 2>&1 &
>
> Testing this by running rc.local at a shell prompt works fine: the daemon
> buries itself in the background and waits to be called. When the script is
> run on reboot, however, there is no sign of the daemon, nor any error
> messages to indicate what went wrong. Worse, if I replace the daemon program
> by a program which does nothing but sleep for two hours and run this as
>
> /usr/local/bin/sleepy &
>
> this also vanishes.
>
> Can anyone suggest what I am doing wrong ?
>
> Thanks, Andrew
Is it possible that /usr/local/bin isn't mounted yet? More generally,
if the error message is caused by the shell being unable to start the
process for one reason or another, the error message wouldn't go to
the stdout or stderr of the daemon but to that of the shell and the
logfile would be present but null. What I do in similar cases is put
the following line at the top of the script (e.g. rc.local):
set -x && exec >logfile 2>&1
Which will dump all the not-otherwise-redirected output of the script
into the logfile. If this file shows nothing, then your rc.local
script isn't being run at all and you need to look at your
/sbin/init.d files.
--
David Boyce dsb@world.std.com 508-370-7375
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1994-09-12 15:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1994-09-12 14:16 Problem starting programs from rc.local Cormack Andrew
1994-09-12 15:54 ` David Boyce
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox