From owner-freebsd-questions Fri Jul 19 5: 2:40 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 587E137B400 for ; Fri, 19 Jul 2002 05:02:38 -0700 (PDT) Received: from topaz.mdcc.cx (topaz.mdcc.cx [212.204.230.141]) by mx1.FreeBSD.org (Postfix) with ESMTP id D446843E42 for ; Fri, 19 Jul 2002 05:02:37 -0700 (PDT) (envelope-from edwin@mavetju.org) Received: from k7.mavetju (topaz.mdcc.cx [212.204.230.141]) by topaz.mdcc.cx (Postfix) with ESMTP id 4ECEC2B8E8; Fri, 19 Jul 2002 14:02:34 +0200 (CEST) Received: by k7.mavetju (Postfix, from userid 1001) id 8BC5A6A711E; Fri, 19 Jul 2002 22:02:27 +1000 (EST) Date: Fri, 19 Jul 2002 22:02:27 +1000 From: Edwin Groothuis To: Per olof Ljungmark Cc: dan@slightlystrange.org, freebsd-questions Subject: Re: Need help with apcupsd startup script Message-ID: <20020719120227.GG577@k7.mavetju> Mail-Followup-To: Edwin Groothuis , Per olof Ljungmark , dan@slightlystrange.org, freebsd-questions References: <3D37F0E2.3080902@intersonic.se> <3D37F0E2.3080902@intersonic.se> <5.1.0.14.0.20020719135041.04247cd0@mail.inter-sonic.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5.1.0.14.0.20020719135041.04247cd0@mail.inter-sonic.com> User-Agent: Mutt/1.4i Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Fri, Jul 19, 2002 at 01:53:13PM +0200, Per olof Ljungmark wrote: > At 12:10 7/19/2002 +0100, Daniel Bye wrote: > >On Fri, Jul 19, 2002 at 12:58:42PM +0200, Per olof Ljungmark wrote: > >> Hi all, > >> > >> I am using apcupsd installed from ports with no mods. > >> apcupsd itself runs fine but the script /usr/local/etc/rc.d/apcupsd.sh > >> returns: > >> apcupsd.sh: Cannot determine the PREFIX > >> when I try it. > >> I assume there are some Linux specific paths in there? > > > > > >How are you calling the script? You must give the absolute path on > >the command line, or the first block (if ! ...) will make it bomb out > >with the error message. > > You are correct. > /usr/local/etc/rc.d/apcupsd.sh start|stop > will work. > Now, how would I modify the script to make "sh apcupsd.sh start|stop" > executed from /usr/local/etc/rc.d/ work? That's not needed, if the script is executable it will be started at boot time. Edwin -- Edwin Groothuis | Personal website: http://www.MavEtJu.org edwin@mavetju.org | Weblog: http://www.mavetju.org/weblog/weblog.php bash$ :(){ :|:&};: | Interested in MUDs? http://www.FatalDimensions.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message