From owner-freebsd-ipfw@FreeBSD.ORG Tue Mar 4 16:24:05 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 05B57106566C for ; Tue, 4 Mar 2008 16:24:05 +0000 (UTC) (envelope-from vladone@spaingsm.com) Received: from thunder.lsstelecom.ro (thunder.lsstelecom.ro [194.117.236.32]) by mx1.freebsd.org (Postfix) with ESMTP id 55A688FC17 for ; Tue, 4 Mar 2008 16:24:04 +0000 (UTC) (envelope-from vladone@spaingsm.com) Received: (qmail 8970 invoked by uid 1010); 4 Mar 2008 18:24:03 +0200 Received: from 88.158.112.6 (vladone@spaingsm.com@88.158.112.6) by thunder (envelope-from , uid 1007) with qmail-scanner-2.01st (clamdscan: 0.91.2/5093. spamassassin: 3.2.3. perlscan: 2.01st. Clear:RC:1(88.158.112.6):. Processed in 1.613009 secs); 04 Mar 2008 16:24:03 -0000 Received: from 6.112.158.88.radiocom.ro (HELO ?127.0.0.1?) (vladone@spaingsm.com@88.158.112.6) by mail.lsstelecom.ro with AES256-SHA encrypted SMTP; 4 Mar 2008 18:24:01 +0200 Message-ID: <47CD779C.7020004@spaingsm.com> Date: Tue, 04 Mar 2008 18:23:56 +0200 From: Fratiman Vladut User-Agent: Thunderbird 2.0.0.12 (Windows/20080213) MIME-Version: 1.0 To: freebsd-ipfw@freebsd.org References: <47CC60B8.3060405@spaingsm.com> <78cb3d3f0803040117n49c56a2dna1b987c064996ff2@mail.gmail.com> In-Reply-To: <78cb3d3f0803040117n49c56a2dna1b987c064996ff2@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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:24:05 -0000 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. Same problem with sh script. For example, i have an script named myifconfig: #!/bin/sh ifconfig ng0 group ng ifconfig ng1 group ng This not work at boot time, but in console, with command "sh myifconfig", do the job. Bits are right set server:/rc.d#ls -l total 42 -rwxr-xr-x 1 root wheel 2325 Mar 3 20:26 myifconfig -rwx--x--x 1 vlad wheel 616 Mar 1 00:51 opendchub All files are in /usr/local/etc/rc.d Adrian Penisoara wrote: > Hi, > > This is better suited for freebsd-questions mailing list. > > On Mon, Mar 3, 2008 at 10:34 PM, Fratiman Vladut > wrote: > > >> I have some sh scripts, that works just fine on freebsd 5.4. >> After installed FreeBsd 7, this script won't run at startup. I put this >> scripts in /usr/local/etc/rc.d, but nothing work. >> > > > Do the files have execution bits set (e.g. chmod +x *) ? > Can you attach one sample script ? > > Regards, > Adrian Penisoara > ROFUG / EnterpriseBSD > _______________________________________________ > freebsd-ipfw@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-ipfw > To unsubscribe, send any mail to "freebsd-ipfw-unsubscribe@freebsd.org" > > >