Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Feb 2020 14:20:52 +0000 (UTC)
From:      Luca Pizzamiglio <pizzamig@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r526971 - in head/sysutils/pot: . files
Message-ID:  <202002241420.01OEKqP5046267@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pizzamig
Date: Mon Feb 24 14:20:52 2020
New Revision: 526971
URL: https://svnweb.freebsd.org/changeset/ports/526971

Log:
  sysutils/pot: adopt PREFIX in the rc script
  
  Remove hard-coded /usr/local and use %%PREFIX%%
  
  Reported by:	jbeich@

Modified:
  head/sysutils/pot/Makefile
  head/sysutils/pot/files/pot.in

Modified: head/sysutils/pot/Makefile
==============================================================================
--- head/sysutils/pot/Makefile	Mon Feb 24 13:23:53 2020	(r526970)
+++ head/sysutils/pot/Makefile	Mon Feb 24 14:20:52 2020	(r526971)
@@ -3,6 +3,7 @@
 
 PORTNAME=	pot
 PORTVERSION=	0.10.4
+PORTREVISION=	1
 CATEGORIES=	sysutils
 
 MAINTAINER=	pizzamig@FreeBSD.org

Modified: head/sysutils/pot/files/pot.in
==============================================================================
--- head/sysutils/pot/files/pot.in	Mon Feb 24 13:23:53 2020	(r526970)
+++ head/sysutils/pot/files/pot.in	Mon Feb 24 14:20:52 2020	(r526971)
@@ -8,7 +8,7 @@
 
 . /etc/rc.subr
 
-PATH=$PATH:/usr/local/bin
+PATH=$PATH:%%PREFIX%%/bin
 name="pot"
 desc="Pot containers"
 procname="pot"
@@ -41,10 +41,10 @@ pot_deprecated_stop()
 pot_start()
 {
 	local _pname _dyn_pot_list _start
-	_dyn_pot_list=$(/usr/local/bin/pot ls -q)
+	_dyn_pot_list=$(%%PREFIX%%/bin/pot ls -q)
 	for _pname in $_dyn_pot_list ; do
-		if _start=$( /usr/local/bin/pot get-attr -p "$_pname" -A start-at-boot -q ) && [ "$_start" = "YES" ]; then
-			/usr/local/bin/pot start "$_pname"
+		if _start=$( %%PREFIX%%/bin/pot get-attr -p "$_pname" -A start-at-boot -q ) && [ "$_start" = "YES" ]; then
+			%%PREFIX%%/bin/pot start "$_pname"
 		fi
 	done
 }
@@ -52,10 +52,10 @@ pot_start()
 pot_stop()
 {
 	local _pname _dyn_pot_list _start
-	_dyn_pot_list=$(/usr/local/bin/pot ls -q)
+	_dyn_pot_list=$(%%PREFIX%%/bin/pot ls -q)
 	for _pname in $_dyn_pot_list ; do
-		if _start=$( /usr/local/bin/pot get-attr -p "$_pname" -A start-at-boot -q ) && [ "$_start" = "YES" ]; then
-			/usr/local/bin/pot stop "$_pname"
+		if _start=$( %%PREFIX%%/bin/pot get-attr -p "$_pname" -A start-at-boot -q ) && [ "$_start" = "YES" ]; then
+			%%PREFIX%%/bin/pot stop "$_pname"
 		fi
 	done
 }
@@ -73,8 +73,8 @@ pot_status()
 {
 	local _pname _dyn_pot_list _start
 	for _pname in $_dyn_pot_list ; do
-		if _start=$( /usr/local/bin/pot get-attr -p "$_pname" -A start-at-boot -q ) && [ "$_start" = "YES" ]; then
-			if /usr/local/bin/pot info -qrp "$_pname" ; then
+		if _start=$( %%PREFIX%%/bin/pot get-attr -p "$_pname" -A start-at-boot -q ) && [ "$_start" = "YES" ]; then
+			if %%PREFIX%%/bin/pot info -qrp "$_pname" ; then
 				echo "pot $_pname is up and running"
 			else
 				echo "pot $_pname is not running"



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