From owner-freebsd-ports@FreeBSD.ORG Mon Sep 1 21:56:39 2003 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3DD8F16A4BF; Mon, 1 Sep 2003 21:56:39 -0700 (PDT) Received: from srv1.cosmo-project.de (srv1.cosmo-project.de [213.83.6.106]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7B5AE4400B; Mon, 1 Sep 2003 21:56:37 -0700 (PDT) (envelope-from andreas@klemm.apsfilter.org) Received: from srv1.cosmo-project.de (localhost [IPv6:::1]) by srv1.cosmo-project.de (8.12.9/8.12.9) with ESMTP id h824t8F5005940 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Tue, 2 Sep 2003 06:55:09 +0200 (CEST) (envelope-from andreas@klemm.apsfilter.org) Received: (from uucp@localhost)h824t8wO005939; Tue, 2 Sep 2003 06:55:08 +0200 (CEST) (envelope-from andreas@klemm.apsfilter.org) Received: from titan.klemm.apsfilter.org (localhost.klemm.apsfilter.org [127.0.0.1]) by klemm.apsfilter.org (8.12.9/8.12.9) with ESMTP id h824pE6q014272; Tue, 2 Sep 2003 06:51:14 +0200 (CEST) (envelope-from andreas@titan.klemm.apsfilter.org) Received: (from andreas@localhost) by titan.klemm.apsfilter.org (8.12.9/8.12.9/Submit) id h824pAXO014271; Tue, 2 Sep 2003 06:51:10 +0200 (CEST) Date: Tue, 2 Sep 2003 06:51:10 +0200 From: Andreas Klemm To: Sergey Matveychuk Message-ID: <20030902045110.GA14187@titan.klemm.apsfilter.org> References: <20030901161847.GA4451@titan.klemm.apsfilter.org> <3F53E1DE.1080800@ciam.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3F53E1DE.1080800@ciam.ru> X-Operating-System: FreeBSD 5.1-CURRENT X-Disclaimer: A free society is one where it is safe to be unpopular User-Agent: Mutt/1.5.4i cc: ports@FreeBSD.org cc: adrian@FreeBSD.org Subject: Re: start/stop script woes: ./squid.sh: Cannot determine the PREFIX X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Sep 2003 04:56:39 -0000 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/