[PC-BSD Commits] r19017 - pcbsd/current/src-sh/pc-updatemanager

svn at pcbsd.org svn at pcbsd.org
Mon Sep 10 11:39:05 PDT 2012


Author: kris
Date: 2012-09-10 18:39:05 +0000 (Mon, 10 Sep 2012)
New Revision: 19017

Modified:
   pcbsd/current/src-sh/pc-updatemanager/pc-updatemanager
Log:

Use /etc/profile for proxy settings



Modified: pcbsd/current/src-sh/pc-updatemanager/pc-updatemanager
===================================================================
--- pcbsd/current/src-sh/pc-updatemanager/pc-updatemanager	2012-09-10 18:38:09 UTC (rev 19016)
+++ pcbsd/current/src-sh/pc-updatemanager/pc-updatemanager	2012-09-10 18:39:05 UTC (rev 19017)
@@ -760,32 +760,10 @@
 
 # Set the program location
 
-# Check if we have proxy settings
-if [ -e "${PCBSD_ETCCONF}" ] ; then
-	PC_PROXYURL="`cat ${PCBSD_ETCCONF} | grep 'PCBSD_PROXYURL: ' | sed 's|PCBSD_PROXYURL: ||g'`"
-	PC_PROXYPORT="`cat ${PCBSD_ETCCONF} | grep 'PCBSD_PROXYPORT: ' | sed 's|PCBSD_PROXYPORT: ||g'`"
-	PC_PROXYTYPE="`cat ${PCBSD_ETCCONF} | grep 'PCBSD_PROXYTYPE: ' | sed 's|PCBSD_PROXYTYPE: ||g'`"
-	PC_PROXYUSER="`cat ${PCBSD_ETCCONF} | grep 'PCBSD_PROXYUSER: ' | sed 's|PCBSD_PROXYUSER: ||g'`"
-	PC_PROXYPASS="`cat ${PCBSD_ETCCONF} | grep 'PCBSD_PROXYPASS: ' | sed 's|PCBSD_PROXYPASS: ||g'`"
-fi
+# Start by sourcing /etc/profile
+# This grabs any HTTP_ / FTP_ PROXY variables
+. /etc/profile
 
-# Create the PROXY variables based upon proxy information supplied
-if [ ! -z "$PC_PROXYURL" ] ; then
-	if [ ! -z "$PC_PROXYPORT" ] ; then
-		HTTP_PROXY="${PC_PROXYURL}:${PC_PROXYPORT}"
-		export HTTP_PROXY
-	else
-		HTTP_PROXY="${PC_PROXYURL}"
-		export HTTP_PROXY
-	fi
-	if [ ! -z "$PC_PROXYUSER" ] ; then
-		if [ ! -z "$PC_PROXYPASS" ] ; then
-			HTTP_PROXY_AUTH="basic:*:${PC_PROXYUSER}:${PC_PROXYPASS}"
-			export HTTP_PROXY_AUTH
-		fi
-	fi
-fi
-
 # Get the default meta package set we are using
 PKGSET="pcbsd"
 PCBSD_ETCCONF="/usr/local/etc/pcbsd.conf"



More information about the Commits mailing list