[PC-BSD Commits] r8001 - pcbsd/current/src-sh/pbi-manager

svn at pcbsd.org svn at pcbsd.org
Sun Nov 7 13:27:15 PST 2010


Author: kris
Date: 2010-11-07 13:27:15 -0800 (Sun, 07 Nov 2010)
New Revision: 8001

Modified:
   pcbsd/current/src-sh/pbi-manager/pbi-manager
Log:

Added functionality to check proxy config from pcbsd.conf if no specific PBI proxy
configuration exists, this will only be useful for PC-BSD specific systems



Modified: pcbsd/current/src-sh/pbi-manager/pbi-manager
===================================================================
--- pcbsd/current/src-sh/pbi-manager/pbi-manager	2010-11-07 21:20:37 UTC (rev 8000)
+++ pcbsd/current/src-sh/pbi-manager/pbi-manager	2010-11-07 21:27:15 UTC (rev 8001)
@@ -686,6 +686,7 @@
 	PBI_HASHDIR="${PBI_APPDIR}/.hashdir"
 	PBI_RCDIR="${SYS_LOCALBASE}/etc/rc.d"
 	PBI_ETCCONF="${SYS_LOCALBASE}/etc/pbi.conf"
+	PCBSD_ETCCONF="${SYS_LOCALBASE}/etc/pcbsd.conf"
 	PBI_DEFAULT_ICON="${PROGBASE}/share/pbi-manager/icons/default.png"
 	PBI_PATCH_ICON="${PROGBASE}/share/pbi-manager/icons/patch.png"
 	PBI_LDCONFIGFILE="${PROGBASE}/etc/ldpbiconfig"
@@ -4130,6 +4131,16 @@
 	PBI_PROXYUSER="`cat ${PBI_ETCCONF} | grep 'PBI_PROXYUSER: ' | sed 's|PBI_PROXYUSER: ||g'`"
 	PBI_PROXYPASS="`cat ${PBI_ETCCONF} | grep 'PBI_PROXYPASS: ' | sed 's|PBI_PROXYPASS: ||g'`"
 
+	# If empty proxy config, check if configured for master pcbsd.conf file
+	if [ -z "$PBI_PROXYURL" ] ; then
+		PBI_PROXYURL="`cat ${PCBSD_ETCCONF} | grep 'PCBSD_PROXYURL: ' | sed 's|PCBSD_PROXYURL: ||g'`"
+		PBI_PROXYPORT="`cat ${PCBSD_ETCCONF} | grep 'PCBSD_PROXYPORT: ' | sed 's|PCBSD_PROXYPORT: ||g'`"
+		PBI_PROXYTYPE="`cat ${PCBSD_ETCCONF} | grep 'PCBSD_PROXYTYPE: ' | sed 's|PCBSD_PROXYTYPE: ||g'`"
+		PBI_PROXYUSER="`cat ${PCBSD_ETCCONF} | grep 'PCBSD_PROXYUSER: ' | sed 's|PCBSD_PROXYUSER: ||g'`"
+		PBI_PROXYPASS="`cat ${PCBSD_ETCCONF} | grep 'PCBSD_PROXYPASS: ' | sed 's|PCBSD_PROXYPASS: ||g'`"
+	fi
+
+
         # Create the PBI_CURLPROXY variable based upon proxy information supplied
 	if [ ! -z "$PBI_PROXYURL" ] ; then
 		if [ "$PBI_PROXYTYPE" = "SOCKS5" ] ; then



More information about the Commits mailing list