[PC-BSD Commits] r9488 - in pcbsd/current/src-sh/pbi-manager: . etc man rc.d
svn at pcbsd.org
svn at pcbsd.org
Fri Mar 4 08:33:41 PST 2011
Author: kris
Date: 2011-03-04 08:33:41 -0800 (Fri, 04 Mar 2011)
New Revision: 9488
Modified:
pcbsd/current/src-sh/pbi-manager/etc/pbi.conf
pcbsd/current/src-sh/pbi-manager/man/pbi.conf.1
pcbsd/current/src-sh/pbi-manager/pbi-manager
pcbsd/current/src-sh/pbi-manager/rc.d/pbid
Log:
Added a few config values to pbi.conf, put them in manpage, update rc.d/pbid
to show when its being stopped
Modified: pcbsd/current/src-sh/pbi-manager/etc/pbi.conf
===================================================================
--- pcbsd/current/src-sh/pbi-manager/etc/pbi.conf 2011-03-04 10:23:04 UTC (rev 9487)
+++ pcbsd/current/src-sh/pbi-manager/etc/pbi.conf 2011-03-04 16:33:41 UTC (rev 9488)
@@ -1,3 +1,8 @@
# PBI Configuration Defaults
-# This file is normally empty, except when using a PROXY
# See the manpage for pbi.conf for more details
+
+# Set the number of hours for pbid to refresh the index/meta files from repos
+PBI_INDEXREFRESH: 24
+
+# Wakeup time in seconds for pbid to run checks
+PBID_REFRESH: 300
Modified: pcbsd/current/src-sh/pbi-manager/man/pbi.conf.1
===================================================================
--- pcbsd/current/src-sh/pbi-manager/man/pbi.conf.1 2011-03-04 10:23:04 UTC (rev 9487)
+++ pcbsd/current/src-sh/pbi-manager/man/pbi.conf.1 2011-03-04 16:33:41 UTC (rev 9488)
@@ -12,6 +12,10 @@
.Pp
.Sh OPTIONS
.Bl -tag -width indent
+.It PBID_REFRESH:
+Wakeup time in seconds for pbid to run checks
+.It PBI_INDEXREFRESH:
+Set the number of hours for pbid to refresh the index/meta files from repos.
.It PBI_PROXYURL:
Proxy server address to use for proxy communication.
.It PBI_PROXYPORT:
Modified: pcbsd/current/src-sh/pbi-manager/pbi-manager
===================================================================
--- pcbsd/current/src-sh/pbi-manager/pbi-manager 2011-03-04 10:23:04 UTC (rev 9487)
+++ pcbsd/current/src-sh/pbi-manager/pbi-manager 2011-03-04 16:33:41 UTC (rev 9488)
@@ -1328,7 +1328,6 @@
PBI_PRUNEBUILDPORTS="YES"
PBI_SKIPCHECKSUM=""
PBI_SKIPSIGVERIFY=""
- PBI_UPDATEURL=""
PBI_USESYSGL="YES"
PBI_USESYSFONTS="YES"
PBI_VERBOSE="NO"
@@ -5647,21 +5646,23 @@
# Read in the global pbi.conf
load_pbi_etcconf() {
- if [ ! -e "${PBI_ETCCONF}" ] ; then return 0 ; fi
- PBI_UPDATEURL="`cat ${PBI_ETCCONF} | grep 'PBI_UPDATEURL: ' | sed 's|PBI_UPDATEURL: ||g'`"
+
PBI_PUBKEYS="`ls ${PBI_DBKEYDIR}/*.ssl 2>/dev/null`"
- # Set the default remote mirror we are using
- PBI_MIRROR="`cat ${PBI_ETCCONF} | grep 'PBI_MIRROR: ' | sed 's|PBI_MIRROR: ||g'`"
- PBI_MIRROR2="`cat ${PBI_ETCCONF} | grep 'PBI_MIRROR2: ' | sed 's|PBI_MIRROR2: ||g'`"
- PBI_MIRROR3="`cat ${PBI_ETCCONF} | grep 'PBI_MIRROR3: ' | sed 's|PBI_MIRROR3: ||g'`"
- PBI_MIRROR4="`cat ${PBI_ETCCONF} | grep 'PBI_MIRROR4: ' | sed 's|PBI_MIRROR4: ||g'`"
-
- # If no additional mirrors
- if [ -z "$PBI_MIRROR2" ] ; then PBI_MIRROR2="$PBI_MIRROR" ; fi
- if [ -z "$PBI_MIRROR3" ] ; then PBI_MIRROR3="$PBI_MIRROR" ; fi
- if [ -z "$PBI_MIRROR4" ] ; then PBI_MIRROR4="$PBI_MIRROR" ; fi
+ if [ ! -e "${PBI_ETCCONF}" ] ; then return 0 ; fi
+ # See if we have a custom index refresh rate
+ _ckPBIIR="`cat ${PBI_ETCCONF} | grep '^PBI_INDEXREFRESH: ' | sed 's|PBI_INDEXREFRESH: ||g'`"
+ if [ ! -z "${_ckPBIIR}" -a $(is_num "$_ckPBIIR") ] ; then
+ PBI_INDEXREFRESH="${_ckPBIIR}"
+ fi
+
+ # See if we have a custom pbid refresh time
+ _ckPBID="`cat ${PBI_ETCCONF} | grep '^PBID_REFRESH: ' | sed 's|PBID_REFRESH: ||g'`"
+ if [ ! -z "${_ckPBID}" -a $(is_num "$_ckPBID") ] ; then
+ PBIDSLEEP="${_ckPBID}"
+ fi
+
# Load Proxy Variables
if [ -z "$PBI_PROXYURL" -a -e "${PBI_ETCCONF}" ] ; then
PBI_PROXYURL="`cat ${PBI_ETCCONF} | grep 'PBI_PROXYURL: ' | sed 's|PBI_PROXYURL: ||g'`"
Modified: pcbsd/current/src-sh/pbi-manager/rc.d/pbid
===================================================================
--- pcbsd/current/src-sh/pbi-manager/rc.d/pbid 2011-03-04 10:23:04 UTC (rev 9487)
+++ pcbsd/current/src-sh/pbi-manager/rc.d/pbid 2011-03-04 16:33:41 UTC (rev 9488)
@@ -28,7 +28,7 @@
return 0
fi
- echo "Starting ${name}."
+ echo "Starting ${name}..."
(nice $command) &
echo "$!" > ${pidfile}
@@ -45,6 +45,7 @@
return;
fi
+ echo "Stopping ${name}..."
kill -9 "`cat ${pidfile}`"
rm "${pidfile}"
}
More information about the Commits
mailing list