Changeset 12b4844


Ignore:
Timestamp:
04/25/14 06:24:09 (12 months ago)
Author:
Kris Moore <kris@…>
Branches:
master, releng/10.0.2, releng/10.0.3, releng/10.1, releng/10.1.1, releng/10.1.2
Children:
b7e7efd
Parents:
f79b427
Message:

Update pc-extractoverlay. Now in /usr/local/etc/pcbsd.conf you can
set PACKAGE_SET: CUSTOM along with PACKAGE_URL: <address> and use
a different PC-BSD package repo location

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src-sh/pc-extractoverlay/pc-extractoverlay

    raac9523 r12b4844  
    1111case $PACKAGE_SET in 
    1212   PRODUCTION|EDGE) ;; 
     13  CUSTOM) # Using a custom package set? 
     14          # Lets check that we have a URL provided 
     15          _urlChk="`sed -n 's/PACKAGE_URL: //p' ${PCBSD_ETCCONF} 2>/dev/null | awk '{print $1}'`" 
     16          if [ -z "${_urlChk}" ] ; then 
     17             echo "Warning: PACKAGE_SET is CUSTOM, but no PACKAGE_URL set!" 
     18             echo "Reverting back to PRODUCTION repo..." 
     19             sleep 3 
     20             CUSTOM_URL="" 
     21             PACKAGE_SET="PRODUCTION" 
     22          else 
     23             CUSTOM_URL="$_urlChk" 
     24          fi 
     25          ;; 
    1326       *) echo "Warning: Invalid PACKAGE_SET!"  
    1427          PACKAGE_SET="PRODUCTION" ;;  
     
    5063  echo -e "Extracting ports overlay data...\c" 
    5164  cd / 
    52   tar xvmf ${distFile} 2>/dev/null 
     65  tar xvm --no-same-owner -f ${distFile} 2>/dev/null 
    5366  if [ $? -eq 0 ] ; then 
    5467    echo -e "DONE" 
     
    7184  echo -e "Extracting desktop overlay data...\c" 
    7285  cd / 
    73   tar xvmf ${distFile} ${excludeOpt} 2>/dev/null 
     86  tar xvm --no-same-owner -f ${distFile} ${excludeOpt} 2>/dev/null 
    7487  if [ $? -eq 0 ] ; then 
    7588    echo -e "DONE" 
     
    96109  echo -e "Extracting server overlay data...\c" 
    97110  cd / 
    98   tar xvmf ${distFile} ${excludeOpt} 2>/dev/null 
     111  tar xvm --no-same-owner -f ${distFile} ${excludeOpt} 2>/dev/null 
    99112  if [ $? -eq 0 ] ; then 
    100113    echo -e "DONE" 
     
    144157  esac 
    145158 
    146   # Setup new pcbsd.conf repo file 
    147   cat /usr/local/etc/pkg/repos/pcbsd.conf.dist \ 
     159  if [ "$PACKAGE_SET" = "CUSTOM" ] ; then 
     160     # Setup the custom pcbsd.conf repo 
     161     cat << EOF >/usr/local/etc/pkg/repos/pcbsd.conf 
     162pcbsd: { 
     163               url: "$CUSTOM_URL", 
     164               signature_type: "fingerprints", 
     165               fingerprints: "/usr/local/etc/pkg/fingerprints/pcbsd", 
     166               enabled: true 
     167              } 
     168EOF 
     169  else 
     170     # Using PC-BSD CDN 
     171     cat /usr/local/etc/pkg/repos/pcbsd.conf.dist \ 
    148172        | sed "s|VERSION|$FBSDVER|g" \ 
    149173        | sed "s|ARCH|$ARCH|g" > /usr/local/etc/pkg/repos/pcbsd.conf 
     174  fi 
    150175} 
    151176 
Note: See TracChangeset for help on using the changeset viewer.