From: dsb@world.std.com (David Boyce)
Subject: Re: Problem starting programs from rc.local
Date: Mon, 12 Sep 1994 15:54:29 GMT [thread overview]
Message-ID: <DSB.94Sep12115429@world.std.com> (raw)
In-Reply-To: scoanc@compu010.cf.ac.uk's message of Mon, 12 Sep 1994 14:16:35 +0000
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
prev parent reply other threads:[~1994-09-12 15:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1994-09-12 14:16 Problem starting programs from rc.local Cormack Andrew
1994-09-12 15:54 ` David Boyce [this message]
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox