From owner-freebsd-java Tue Mar 25 12:52:36 2003 Delivered-To: freebsd-java@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D2AF137B401 for ; Tue, 25 Mar 2003 12:52:33 -0800 (PST) Received: from habanero.hesketh.net (habanero.hesketh.net [66.45.6.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id C0E8743FAF for ; Tue, 25 Mar 2003 12:52:32 -0800 (PST) (envelope-from brent@mutt.rcfile.org) X-Received-From: brent@mutt.rcfile.org X-Delivered-To: freebsd-java@FreeBSD.ORG X-Originating-IP: [66.57.229.60] Received: from mutt.rcfile.org (rdu57-229-060.nc.rr.com [66.57.229.60]) by habanero.hesketh.net (8.12.8/8.12.8) with ESMTP id h2PKqBVC029347; Tue, 25 Mar 2003 15:52:14 -0500 X-Spam-Filter: check_local@habanero.hesketh.net by digitalanswers.org Received: from mutt.rcfile.org (localhost [127.0.0.1]) by mutt.rcfile.org (8.12.8/8.12.7) with ESMTP id h2PKqKa3054517; Tue, 25 Mar 2003 15:52:20 -0500 (EST) (envelope-from brent@mutt.rcfile.org) Received: (from brent@localhost) by mutt.rcfile.org (8.12.8/8.12.8/Submit) id h2PKqARG054515; Tue, 25 Mar 2003 15:52:10 -0500 (EST) Date: Tue, 25 Mar 2003 15:52:10 -0500 From: Brent Verner To: Greg Lewis Cc: Ari Suutari , Ernst de Haan , freebsd-java@FreeBSD.ORG Subject: Re: [patch] daemonctl.c modified to use JAVA_HOME environment variable Message-ID: <20030325205210.GA54355@rcfile.org> References: <20030207163217.GA99329@rcfile.org> <200303241032.54982.ernst.dehaan@nl.wanadoo.com> <20030324142632.GA36430@rcfile.org> <200303250909.23762.ari.suutari@syncrontech.com> <20030326032708.A38505@misty.eyesbeyond.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030326032708.A38505@misty.eyesbeyond.com> X-muttrc: $Id: .muttrc,v 1.10 2003/02/08 08:35:24 brent Exp $ X-uname: FreeBSD 4.8-RC #6: Thu Mar 20 02:22:17 EST 2003 root@mutt.rcfile.org:/usr/obj/usr/src/sys/MUTTS User-Agent: Mutt/1.5.3i X-Spam-Status: No, hits=-14.5 required=5.0 tests=AWL,IN_REP_TO,RCVD_IN_RFCI,REFERENCES,USER_AGENT_MUTT autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) Sender: owner-freebsd-java@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org [2003-03-26 03:27] Greg Lewis said: | On Tue, Mar 25, 2003 at 09:09:23AM +0200, Ari Suutari wrote: | > > This should probably be a separate port, and just have each | > > dependent package install its xml config into | > > /usr/local/etc/daemonct.d/ and create its symlink to the | > > daemonctl binary. | > progname = (rindex(argv[0],'/') + 1); | | getprogname(3) After noticing that glibc doesn't have this utility, I ended up using basename(3). I also added a little more error handling, and changed strncat to strlcat (after adding a compatibility macro for glibc systems...). thanks. brent -- "Develop your talent, man, and leave the world something. Records are really gifts from people. To think that an artist would love you enough to share his music with anyone is a beautiful thing." -- Duane Allman To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-java" in the body of the message