From owner-freebsd-questions Fri Jul 20 14:57:49 2001 Delivered-To: freebsd-questions@freebsd.org Received: from mail7.nc.rr.com (fe7.southeast.rr.com [24.93.67.54]) by hub.freebsd.org (Postfix) with ESMTP id 8E0D037B403 for ; Fri, 20 Jul 2001 14:57:44 -0700 (PDT) (envelope-from freebsd@nc.rr.com) Received: from tbird-850-win2k ([66.26.225.2]) by mail7.nc.rr.com with Microsoft SMTPSVC(5.5.1877.687.68); Fri, 20 Jul 2001 17:57:43 -0400 Date: Fri, 20 Jul 2001 18:03:07 -0400 From: Neill Robins X-Mailer: The Bat! (v1.48f) Personal Reply-To: Neill Robins X-Priority: 3 (Normal) Message-ID: <122211770169.20010720180307@nc.rr.com> To: "Todd Reed" Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Startup Scripts version 2 In-reply-To: References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Friday, July 20, 2001, 4:12:26 PM, Todd Reed wrote: TR> I created a /usr/local/rc.d called startup.sh. When I restart my machine, TR> it doesn't seem to execute. Below is the code in the sh file. What am I TR> doing wrong? Do I have to edit the rc.conf? TR> #!/bin/sh TR> # TR> /sbin/ldconfig -m /usr/local/lib/mysql TR> if [ -x /mnt/vdrv/dbms/bin/safe_mysqld ] TR> then TR> /mnt/vdrv/dbms/bin/safe_mysqld > /dev/null & && echo -n ` mysql` TR> fi Todd, Mike Meyer just might have the answer. Give this a try. From Mike Meyer: It should also check for the arguments "start" and "stop" so it can be used at system startup and system shutdown time. Here's a trivial example: #!/bin/sh MIXERSTATE=/var/db/mixer-state case $1 in start) [ -r $MIXERSTATE ] && /usr/sbin/mixer `cat $MIXERSTATE` > /dev/null ;; stop) /usr/sbin/mixer -s > $MIXERSTATE ;; *) echo "usage: `basename $0` {start|stop}" >&2 exit 64 ;; esac http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. -- Good Luck, -Neill freebsd@nc.rr.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message