From owner-freebsd-questions Fri Jul 19 3:58:55 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 B6C3337B400 for ; Fri, 19 Jul 2002 03:58:53 -0700 (PDT) Received: from neonpark.inter-sonic.com (neonpark.inter-sonic.com [212.247.185.177]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9238F43E65 for ; Fri, 19 Jul 2002 03:58:52 -0700 (PDT) (envelope-from peo@intersonic.se) Received: from penguin.inter-sonic.com (penguin.inter-sonic.com [172.16.1.3]) by neonpark.inter-sonic.com (8.11.4/8.11.4) with ESMTP id g6JAwiJ21599 for ; Fri, 19 Jul 2002 12:58:45 +0200 (CEST) Received: from intersonic.se ([217.215.7.177]) by penguin.inter-sonic.com (Netscape Messaging Server 4.15) with ESMTP id GZHT5W00.124 for ; Fri, 19 Jul 2002 12:58:44 +0200 Message-ID: <3D37F0E2.3080902@intersonic.se> Date: Fri, 19 Jul 2002 12:58:42 +0200 From: "Per olof Ljungmark" User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.0.0) Gecko/20020718 X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-questions Subject: Need help with apcupsd startup script Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit 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 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? First lines of the script goes: if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then echo "$0: Cannot determine the PREFIX" >&2 exit 1 fi # If there is a global system configuration file, suck it in. if [ -r /etc/defaults/rc.conf ]; then . /etc/defaults/rc.conf source_rc_confs elif [ -r /etc/rc.conf ]; then . /etc/rc.conf fi apcupsd_enable=${apcupsd_enable:-YES} apcupsd_program=${apcupsd_program:-${PREFIX}/sbin/apcupsd} apcupsd_flags=${apcupsd_flags:-"--kill-on-powerfail"} apcupsd_pidfile=${apcupsd_pidfile:-/var/run/apcupsd.pid} apcupsd_lockfile=${apcupsd_pidfile:-/var/spool/lock/apcupsd.lock} thanks, /per olof To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message