Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 Jul 2001 18:03:07 -0400
From:      Neill Robins <freebsd@nc.rr.com>
To:        "Todd Reed" <ex279@hotmail.com>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: Startup Scripts version 2
Message-ID:  <122211770169.20010720180307@nc.rr.com>
In-Reply-To: <F253sXZZTHfyQgeDKvP00002045@hotmail.com>
References:  <F253sXZZTHfyQgeDKvP00002045@hotmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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

        <mike
--
Mike Meyer <mwm@mired.org>                      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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?122211770169.20010720180307>