[PC-BSD Commits] r9714 - in pcbsd/current/src-sh/pbi-manager: . etc
svn at pcbsd.org
svn at pcbsd.org
Thu Mar 17 14:15:30 PDT 2011
Author: kris
Date: 2011-03-17 14:15:30 -0700 (Thu, 17 Mar 2011)
New Revision: 9714
Modified:
pcbsd/current/src-sh/pbi-manager/etc/pbi.conf
pcbsd/current/src-sh/pbi-manager/pbi-manager
Log:
Added logfile turnover for PBID, and also increased default sleep time
Modified: pcbsd/current/src-sh/pbi-manager/etc/pbi.conf
===================================================================
--- pcbsd/current/src-sh/pbi-manager/etc/pbi.conf 2011-03-17 21:02:24 UTC (rev 9713)
+++ pcbsd/current/src-sh/pbi-manager/etc/pbi.conf 2011-03-17 21:15:30 UTC (rev 9714)
@@ -5,4 +5,4 @@
PBI_INDEXREFRESH: 24
# Wakeup time in seconds for pbid to run checks
-PBID_REFRESH: 300
+PBID_REFRESH: 900
Modified: pcbsd/current/src-sh/pbi-manager/pbi-manager
===================================================================
--- pcbsd/current/src-sh/pbi-manager/pbi-manager 2011-03-17 21:02:24 UTC (rev 9713)
+++ pcbsd/current/src-sh/pbi-manager/pbi-manager 2011-03-17 21:15:30 UTC (rev 9714)
@@ -1219,7 +1219,8 @@
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
+ PBIDSLEEP="900" # Amount of time to sleep before waking up pbid
+ PBI_LOG_LINES="500"
# What dirs do we build hash-lists of
HASH_SEARCH_DIRS="lib kde4/lib share include info man"
@@ -4022,6 +4023,15 @@
rm_tmpdir
fi
+
+ # Check if we should rotate the logfile
+ _pbidLines=`wc -l ${_pbid_log} | awk '{ print $1 }'`
+ if [ $(is_num "$_pbidLines") ] ; then
+ if [ $_pbidLines -gt $PBI_LOG_LINES ] ; then
+ echo "Logfile turnover: `date`" >${_pbid_log}
+ fi
+ fi
+
# Done with our check, lets go back to sleep now
sleep ${PBIDSLEEP}
More information about the Commits
mailing list