From owner-freebsd-ipfw@FreeBSD.ORG Tue Mar 4 16:37:44 2008 Return-Path: Delivered-To: freebsd-ipfw@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 59E42106566C for ; Tue, 4 Mar 2008 16:37:44 +0000 (UTC) (envelope-from ady@ady.ro) Received: from gv-out-0910.google.com (gv-out-0910.google.com [216.239.58.188]) by mx1.freebsd.org (Postfix) with ESMTP id 4285C8FC1C for ; Tue, 4 Mar 2008 16:37:43 +0000 (UTC) (envelope-from ady@ady.ro) Received: by gv-out-0910.google.com with SMTP id n40so967090gve.39 for ; Tue, 04 Mar 2008 08:37:41 -0800 (PST) Received: by 10.143.36.15 with SMTP id o15mr552347wfj.182.1204648659329; Tue, 04 Mar 2008 08:37:39 -0800 (PST) Received: by 10.143.167.6 with HTTP; Tue, 4 Mar 2008 08:37:39 -0800 (PST) Message-ID: <78cb3d3f0803040837i64726c44w7f57e1f7978a74f8@mail.gmail.com> Date: Tue, 4 Mar 2008 18:37:39 +0200 From: "Adrian Penisoara" Sender: ady@ady.ro To: "Fratiman Vladut" In-Reply-To: <47CD779C.7020004@spaingsm.com> MIME-Version: 1.0 References: <47CC60B8.3060405@spaingsm.com> <78cb3d3f0803040117n49c56a2dna1b987c064996ff2@mail.gmail.com> <47CD779C.7020004@spaingsm.com> X-Google-Sender-Auth: a44ac96b0e755fee Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-ipfw@freebsd.org Subject: Re: run sh script at boot time on freebsd X-BeenThere: freebsd-ipfw@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: IPFW Technical Discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Mar 2008 16:37:44 -0000 Hi, On Tue, Mar 4, 2008 at 6:23 PM, Fratiman Vladut wrote: > Is set, but not work. > For example, i have script to launch opendchub daemon: > name of file: opendchub > content: > #! /bin/sh > > case "$1" in > start) > [ -x /usr/local/bin/opendchub ] && > /usr/local/bin/opendchub -w /usr/local/etc/ -l /var/log/opendchub.log> > /dev/null && echo 'Started opendchub' > ;; > stop) > killall -9 opendchub > /dev/null && echo 'hub stopped.' > ;; > restart) > $0 stop > $0 start > ;; > status) > ps -auxww | egrep opendchub | egrep -v "($0|egrep)" > ;; > *) > #echo "Usage: `basename $0` {start|stop|restart|status}" >&2 > [ -x /usr/local/bin/opendchub ] && > /usr/local/bin/opendchub -l /var/log/opendchub.log -w > /usr/local/etc/> /dev/null && echo 'Started opendchub' > ;; > esac > > exit 0 > > This script don't start. When i run in console, with command "sh > opendchub", then the daemon start without any problem. The rc.d scripts syntax has changed in the mean time -- you/it should make use of the /etc/rc.subr stub. For packages you will need to upgrade them [from updated ports] to the latest version. Check whether you have an /etc/rc.d/localpkg script. Try to run it with trace (e.g. "sh -x /etc/rc.d/localpkg start"). Regards, Adrian Penisoara ROFUG / EnterpriseBSD