Mailinglist Archive: opensuse (5130 mails)

< Previous Next >
Re: [SLE] Permanant bridge
  • From: Ken Schneider <suse-list2@xxxxxxxxxxxxx>
  • Date: Thu, 18 May 2006 23:15:06 -0400
  • Message-id: <1148008506.1350.30.camel@xxxxxxxxxxxxxxxxx>
On Thu, 2006-05-18 at 10:55 -0500, Peter Van Lone wrote:
> On 5/18/06, Ken Schneider <suse-list2@xxxxxxxxxxxxx> wrote:
> > It's not quite as simple as that. Look at the following:
>
> yes, I am studying skeleton right now, trying to get a handle on it.
> It looks as though, for most services, the "required start/stop" and
> "should start/stop" are pretty straight-foreward. Does the local file
> system need to be up? Does a remote file system need to be up? Does
> the network need to be up? etc ...
>
> I am a little confused about whether every section HAS to be done for
> each service you want to start. For example:
>
>
> # Check for missing binaries (stale symlinks should not happen)
> # Note: Special treatment of stop for LSB conformance
> FOO_BIN=/usr/sbin/FOO
> test -x $FOO_BIN || { echo "$FOO_BIN not installed";
> if [ "$1" = "stop" ]; then exit 0;
> else exit 5; fi; }
>
> # Check for existence of needed config file and read it
> FOO_CONFIG=/etc/sysconfig/FOO
> test -r $FOO_CONFIG || { echo "$FOO_CONFIG not existing";
> if [ "$1" = "stop" ]; then exit 0;
> else exit 6; fi; }
>
> # Read config
> . $FOO_CONFIG
>
> Do I HAVE to do this testing for each service? And, what if the
> service/program does not have a particular config file? Or, what if
> the service finds it's config file on it's own? Do I still need to
> complete this section? Or, can I comment it all out?
>

The best thing to do is to look at the other scripts in /etc/init.d and
use them as examples for your script. If there is no config file for
your script you can delete or comment out that part of your script.

--
Ken Schneider
UNIX since 1989, linux since 1994, SuSE since 1998


< Previous Next >