[PC-BSD Commits] r21891 - in pcbsd/current/src-sh/pbi-manager: . etc

svn at pcbsd.org svn at pcbsd.org
Sun Mar 17 02:48:56 PDT 2013


Author: kris
Date: 2013-03-17 09:48:56 +0000 (Sun, 17 Mar 2013)
New Revision: 21891

Modified:
   pcbsd/current/src-sh/pbi-manager/etc/pbi.conf
   pcbsd/current/src-sh/pbi-manager/pbi-manager
Log:

Add a new variable to pbi.conf:

PBI_FBSDMAJOR:

This can be set to the major FreeBSD version we are wanting to get PBIs for.

This may need to be set when running -CURRENT, or some other version with no PBIs



Modified: pcbsd/current/src-sh/pbi-manager/etc/pbi.conf
===================================================================
--- pcbsd/current/src-sh/pbi-manager/etc/pbi.conf	2013-03-17 09:21:53 UTC (rev 21890)
+++ pcbsd/current/src-sh/pbi-manager/etc/pbi.conf	2013-03-17 09:48:56 UTC (rev 21891)
@@ -6,3 +6,7 @@
 
 # Wakeup time in seconds for pbid to run checks
 PBID_REFRESH: 300
+
+# Set to the major FreeBSD version to pull index / PBI files from
+# I.E. "9" for the 9.x series, "10" for the 10.x series. 
+# PBI_FBSDMAJOR: 

Modified: pcbsd/current/src-sh/pbi-manager/pbi-manager
===================================================================
--- pcbsd/current/src-sh/pbi-manager/pbi-manager	2013-03-17 09:21:53 UTC (rev 21890)
+++ pcbsd/current/src-sh/pbi-manager/pbi-manager	2013-03-17 09:48:56 UTC (rev 21891)
@@ -1322,6 +1322,9 @@
 	# Set the FreeBSD Major & Release
   	FBSDREL=`uname -r`
 	FBSDMAJOR=${FBSDREL%%.*}
+	if [ -n "$PBI_MAJORVERSION" ] ; then
+		FBSDMAJOR=${PBI_FBSDMAJOR}
+	fi
 
 	PBI_WORLDCHROOT="${PBI_APPDIR}/.pbi-world-$ARCH"
 	if [ `id -u` = "0" ] ; then 
@@ -1344,7 +1347,15 @@
 	PBI_LDCONFIGFILE="${PROGBASE}/etc/ldpbiconfig"
 	PBI_LDCONFIGRC="${PROGBASE}/etc/rc.d/ldpbiconfig"
 	PROGVERSION="1.0"
-	PBIDSLEEP="300"		# Amount of time to sleep before waking up pbid
+
+	# Settings for pbid
+	if [ -z "$PBIDSLEEP" ] ; then
+		PBIDSLEEP="300"	# Amount of time to sleep before waking up pbid
+	fi
+	if [ -z "$PBI_INDEXREFRESH" ] ; then
+		PBI_INDEXREFRESH="24" # Hours to wait until we re-download PBI indexes
+	fi
+
 	PBI_LOG_LINES="500"
 	PBI_INSTALLGROUP="operator"
 
@@ -1387,7 +1398,6 @@
 	PBI_FILENAME=""
 	PBI_FORCEADD="NO"
 	PBI_HASHLIST=".pbi-hash-list"
-	PBI_INDEXREFRESH="24" # Hours to wait until we re-download PBI indexes
 	PBI_INDEXUPFILE="pbi-index-$FBSDMAJOR"
 	PBI_METAUPFILE="pbi-meta-$FBSDMAJOR"
 	PBI_INFONAME=""
@@ -7225,6 +7235,12 @@
 		PBI_INDEXREFRESH="${_ckPBIIR}"
 	fi
 
+	# Check for a custom FBSDMAJOR version
+	_ckPBIMAJOR="`sed -n 's/^PBI_FBSDMAJOR: //gp' ${PBI_ETCCONF}`"
+	if [ -n "${_ckPBIMAJOR}" -a $(is_num "$_ckPBIMAJOR") ] ; then 
+		PBI_FBSDMAJOR="${_ckPBIMAJOR}"
+	fi
+
 	# See if we have a custom pbid refresh time
 	_ckPBID="`cat ${PBI_ETCCONF} | grep '^PBID_REFRESH: ' | sed 's|PBID_REFRESH: ||g'`"
 	if [ -n "${_ckPBID}" -a $(is_num "$_ckPBID") ] ; then 
@@ -7422,9 +7438,9 @@
 
 # Main program operation
 ##############################################################
+load_pbi_etcconf
 init_vars
 mk_required_dirs
-load_pbi_etcconf
 
 trap exit_trap 1 2 3 9 15
 



More information about the Commits mailing list