[PC-BSD Commits] r19932 - in pcbsd/branches/9.1/src-sh: pc-metapkgmanager pc-updatemanager warden/scripts/backend

svn at pcbsd.org svn at pcbsd.org
Thu Oct 25 11:36:31 PDT 2012


Author: kris
Date: 2012-10-25 18:36:31 +0000 (Thu, 25 Oct 2012)
New Revision: 19932

Modified:
   pcbsd/branches/9.1/src-sh/pc-metapkgmanager/pc-metapkgmanager
   pcbsd/branches/9.1/src-sh/pc-updatemanager/pc-updatemanager
   pcbsd/branches/9.1/src-sh/warden/scripts/backend/functions.sh
Log:

MFC fixes to use get_mirror



Modified: pcbsd/branches/9.1/src-sh/pc-metapkgmanager/pc-metapkgmanager
===================================================================
--- pcbsd/branches/9.1/src-sh/pc-metapkgmanager/pc-metapkgmanager	2012-10-25 18:33:22 UTC (rev 19931)
+++ pcbsd/branches/9.1/src-sh/pc-metapkgmanager/pc-metapkgmanager	2012-10-25 18:36:31 UTC (rev 19932)
@@ -568,8 +568,8 @@
 use_default_mirror()
 {
   # Get the default mirror URL
-  PCBSD_ETCCONF="/usr/local/etc/pcbsd.conf"
-  local mirrChk="`sed -n 's/PCBSD_MIRROR: //p' ${PCBSD_ETCCONF} 2>/dev/null`"
+  get_mirror
+  local mirrChk="$VAL"
   local pcVer="`pbreg get /PC-BSD/Version 2>/dev/null`"
   local pcArch="`uname -m`"
   if [ -z "${mirrChk}" -o -z "${pcVer}" -o -z "$pcArch" ] ; then 

Modified: pcbsd/branches/9.1/src-sh/pc-updatemanager/pc-updatemanager
===================================================================
--- pcbsd/branches/9.1/src-sh/pc-updatemanager/pc-updatemanager	2012-10-25 18:33:22 UTC (rev 19931)
+++ pcbsd/branches/9.1/src-sh/pc-updatemanager/pc-updatemanager	2012-10-25 18:36:31 UTC (rev 19932)
@@ -41,7 +41,8 @@
 if [ ! -d "${DOWNLOADDIR}" ]; then mkdir -p ${DOWNLOADDIR}; fi
 
 # Set the mirror URL
-MIRRORURL="`cat ${PCBSD_ETCCONF} | grep 'PCBSD_MIRROR: ' | sed 's|PCBSD_MIRROR: ||g'`"
+get_mirror
+MIRRORURL="$VAL"
 
 # Trigger File for Tray Application
 TRIGGERFILE="/tmp/.sysupdatetraytrigger"

Modified: pcbsd/branches/9.1/src-sh/warden/scripts/backend/functions.sh
===================================================================
--- pcbsd/branches/9.1/src-sh/warden/scripts/backend/functions.sh	2012-10-25 18:33:22 UTC (rev 19931)
+++ pcbsd/branches/9.1/src-sh/warden/scripts/backend/functions.sh	2012-10-25 18:36:31 UTC (rev 19932)
@@ -52,9 +52,8 @@
 
   # Set the mirror URL, may be overridden by setting MIRRORURL environment variable
   if [ -z "${MIRRORURL}" ]; then
-    MIRRORURL="$(grep ^PCBSD_MIRROR: ${PCBSD_ETCCONF} | cut -d' ' -f2)"
-    # Use the default mirror, if no other mirror is found.
-    [ -z "${MIRRORURL}" ] && MIRRORURL="http://ftp.pcbsd.org/pub/mirror"
+    get_mirror
+    MIRRORURL="$VAL"
   fi
 
   if [ ! -d "${JDIR}" ] ; then mkdir -p "${JDIR}" ; fi



More information about the Commits mailing list