From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,b7f98f2394555e00 X-Google-Attributes: gidfee84,public X-Google-ArrivalTime: 1994-09-12 10:59:27 PST Newsgroups: comp.unix.osf.osf1 Path: nntp.gmd.de!xlink.net!howland.reston.ans.net!europa.eng.gtefsd.com!MathWorks.Com!news.kei.com!world!dsb From: dsb@world.std.com (David Boyce) Subject: Re: Problem starting programs from rc.local In-Reply-To: scoanc@compu010.cf.ac.uk's message of Mon, 12 Sep 1994 14:16:35 +0000 Message-ID: Sender: dsb@world.std.com (David Boyce) Organization: The World References: <1994Sep12.141637.19191@cm.cf.ac.uk> Date: Mon, 12 Sep 1994 15:54:29 GMT 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