[PC-BSD Commits] r19015 - pcbsd/current/src-sh/pc-netupdate

svn at pcbsd.org svn at pcbsd.org
Mon Sep 10 11:36:54 PDT 2012


Author: kris
Date: 2012-09-10 18:36:54 +0000 (Mon, 10 Sep 2012)
New Revision: 19015

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

Source /etc/profile for proxy settings



Modified: pcbsd/current/src-sh/pc-netupdate/pc-netupdate
===================================================================
--- pcbsd/current/src-sh/pc-netupdate/pc-netupdate	2012-09-10 18:36:13 UTC (rev 19014)
+++ pcbsd/current/src-sh/pc-netupdate/pc-netupdate	2012-09-10 18:36:54 UTC (rev 19015)
@@ -14,30 +14,9 @@
   mkdir -p "${FILEDBDIR}"
 fi
 
-# Create the PROXY variables based upon proxy information supplied
-PCBSD_ETCCONF="/usr/local/etc/pcbsd.conf"
-PROXYURL="`sed -n 's/PCBSD_PROXYURL: //p' ${PCBSD_ETCCONF}`"
-PROXYPORT="`sed -n 's/PCBSD_PROXYPORT: //p' ${PCBSD_ETCCONF}`"
-PROXYTYPE="`sed -n 's/PCBSD_PROXYTYPE: //p' ${PCBSD_ETCCONF}`"
-PROXYUSER="`sed -n 's/PCBSD_PROXYUSER: //p' ${PCBSD_ETCCONF}`"
-PROXYPASS="`sed -n 's/PCBSD_PROXYPASS: //p' ${PCBSD_ETCCONF}`"
-if [ -n "$PROXYURL" ] ; then
-  if [ -n "$PROXYPORT" ] ; then
-     HTTP_PROXY="${PROXYURL}:${PROXYPORT}"
-     FTP_PROXY="$PROXYURL}:${PROXYPORT}"
-     export HTTP_PROXY FTP_PROXY
-  else
-     HTTP_PROXY="${PROXYURL}"
-     FTP_PROXY="${PROXYURL}"
-     export HTTP_PROXY FTP_PROXY
-  fi
-  if [ -n "$PROXYUSER" ] ; then
-     if [ -n "$PROXYPASS" ] ; then
-	HTTP_PROXY_AUTH="basic:*:${PROXYUSER}:${PROXYPASS}"
-	export HTTP_PROXY_AUTH
-     fi
-  fi
-fi
+# Start by sourcing /etc/profile
+# This grabs any HTTP_ / FTP_ PROXY variables
+. /etc/profile
 
 # Check for updates to do
 check_updates() {



More information about the Commits mailing list