Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 2 Sep 2003 06:51:10 +0200
From:      Andreas Klemm <andreas@FreeBSD.org>
To:        Sergey Matveychuk <sem@ciam.ru>
Cc:        adrian@FreeBSD.org
Subject:   Re: start/stop script woes: ./squid.sh: Cannot determine the PREFIX
Message-ID:  <20030902045110.GA14187@titan.klemm.apsfilter.org>
In-Reply-To: <3F53E1DE.1080800@ciam.ru>
References:  <20030901161847.GA4451@titan.klemm.apsfilter.org> <3F53E1DE.1080800@ciam.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Sep 02, 2003 at 04:18:38AM +0400, Sergey Matveychuk wrote:
> Andreas Klemm wrote:
> >#!/bin/sh
> >
> >if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then
> >    echo "$0: Cannot determine the PREFIX" >&2
> >    exit 1
> >fi
> >[...]
> >
> >I don't know if you share my feelings about that ;-)
> 
> I'm sharing your feelings. I've found it quite uncomfortable.
> 
> >Q: Can we get rid of that and hardcode the paths in start stop
> >scripts so that they can be called without complete path ?
> 
> I think we need ask adrian@ to do so.

I put him on Cc:

Adrian, do you see a possibility to revamp all ports, that
have this PREFIX trickery in it ?

Additionally, some ports like ntop install their start stop script
without execute bit. Then the port doesn't startup when booting.
Since we already have a mechanism to disable a port by installing
it with a ".sample" or such appended I think there is no need to
add a new scheme. What about parsing the pkg file and setting the
x bit by finding out, what the start/stop script is, no matter what
the port maintainer "forgot" ?

	Andreas ///

-- 
Andreas Klemm - Powered by FreeBSD 5.1-CURRENT
Need a magic printfilter today ? -> http://www.apsfilter.org/



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