From owner-freebsd-rc@FreeBSD.ORG Thu Jul 22 08:59:18 2004 Return-Path: Delivered-To: freebsd-rc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E221F16A4CE for ; Thu, 22 Jul 2004 08:59:18 +0000 (GMT) Received: from fillmore.dyndns.org (port-212-202-50-15.dynamic.qsc.de [212.202.50.15]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5CCE443D41 for ; Thu, 22 Jul 2004 08:59:18 +0000 (GMT) (envelope-from eikemeier@fillmore-labs.com) Received: from dhcp-14.local ([172.16.0.14] helo=dhcp-11.local) by fillmore.dyndns.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.40 (FreeBSD)) id 1BnZQ2-000Pvg-HX; Thu, 22 Jul 2004 10:59:17 +0200 Date: Thu, 22 Jul 2004 11:00:15 +0200 Content-Type: text/plain; charset=US-ASCII; format=flowed Mime-Version: 1.0 (Apple Message framework v482) To: Paul Schmehl From: Oliver Eikemeier In-Reply-To: Message-Id: <8C8C3455-DBBD-11D8-BA2D-00039312D914@fillmore-labs.com> Content-Transfer-Encoding: 7bit User-Agent: KMail/1.5.9 cc: freebsd-rc@freebsd.org Subject: Re: rc script won't start daemon on reboot X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to /etc/rc.d design and implementation. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jul 2004 08:59:19 -0000 Paul Schmehl wrote: > --On Wednesday, July 21, 2004 09:59:21 AM +0200 Oliver Eikemeier > wrote: >> Try >> echo 'rc_debug="YES"' >> /etc/rc.conf >> >> and look at the trace info in /var/log/messages. >> > Here it is: > > /var/log/messages: > > Jul 21 12:23:06 smblure root: /usr/local/etc/rc.d/extractor.sh: INFO: > checkyesno: extractor_enable is set to YES. > Jul 21 12:23:06 smblure root: /usr/local/etc/rc.d/extractor.sh: INFO: > run_rc_command: _doit: /usr/local/bin/extractor -D > > Despite this, the daemon did not start. > > bash-2.05b# /usr/local/etc/rc.d/extractor.sh status > /usr/local/etc/rc.d/extractor.sh: DEBUG: checkyesno: extractor_enable > is set to YES. > extractor is not running. > > bash-2.05b# /usr/local/etc/rc.d/extractor.sh start > /usr/local/etc/rc.d/extractor.sh: DEBUG: checkyesno: extractor_enable > is set to YES. > Starting extractor. > /usr/local/etc/rc.d/extractor.sh: DEBUG: run_rc_command: _doit: > /usr/local/bin/extractor -D > DeepSight Extractor 4.3 > Copyright 2000-2004, Symantec > > Using sensors file: /root/.extractor/Timestamps > Using config file: /root/.extractor/ConfigFile.ini > > Initializing Daemon Mode. > > ********* > * NOTE: * > ********* > When any of your logfiles are moved/renamed or rolled, you must > kill -HUP the Extractor process. > Please see the README-FIRST file for details. > > bash-2.05b# /usr/local/etc/rc.d/extractor.sh status > /usr/local/etc/rc.d/extractor.sh: DEBUG: checkyesno: extractor_enable > is set to YES. > extractor is running as pid 229. > > This is really strange. It appears that the exact same command that > fails during boot succeeds from the commandline. > > Is there a way to use ktrace to capture everything that's going on with > this script during the reboot? I wonder if it matters that > /usr/local/bin/extractor is a symlink to > /usr/local/extractor/bin/extractor? > > bash-2.05b# ls -lsa /usr/local/bin/extractor > 0 lrwxr-xr-x 1 root wheel 34 Jul 12 15:34 > /usr/local/bin/extractor -> /usr/local/extractor/bin/extractor This violates hier(7), but should not be the cause of any of your current problems. Perhaps Extractor depends on PATH or other environment variables that are not set during startup. Of course you can replace the symlink with a small shell script dumping the environment and wrapping the call to extractor with truss (or ktrace), but I would try debugging options to extractor first, or contact Symantec support. Btw, when extractor supports SIGHUP you can set `extra_commands="reload"' -Oliver