Ignore:
Timestamp:
07/17/14 08:34:46 (8 months ago)
Author:
Kris Moore <kris@…>
Branches:
master, releng/10.0.3, releng/10.1, releng/10.1.1
Children:
22ac836
Parents:
03eaf3af
Message:

When the user requests to create a jail with a ports tree, use
portsnap instead of the older ports.txz from distfiles.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src-sh/warden/scripts/backend/createjail.sh

    r698a249 r63aed4d  
    236236fi 
    237237 
    238 if [ "$PORTS" = "YES" ] 
    239 then 
     238if [ "$PORTS" = "YES" ]; then 
    240239  echo "Fetching ports..." 
    241   mkdir -p "${JAILDIR}/usr/ports" 
    242   cd ${JAILDIR} 
    243   SYSVER="$(uname -r | cut -d '-' -f 1-2)" 
    244   get_file_from_mirrors "/${SYSVER}/${ARCH}/dist/ports.txz" "ports.txz" "iso" 
     240  mkdir -p "${JAILDIR}/usr/ports" 2>/dev/null >/dev/null 
     241  cat /usr/sbin/portsnap | sed 's|! -t 0|-z '1'|g' | /bin/sh -s -d ${JAILDIR}/var/db/portsnap -p ${JAILDIR}/usr/ports fetch extract update 
    245242  if [ $? -ne 0 ] ; then 
    246243    echo "Error while downloading the ports tree." 
    247244  else 
    248     echo "Extracting ports.. May take a while.." 
    249     tar xvf ports.txz -C "${JAILDIR}" 2>/dev/null 
    250     rm ports.txz 
    251245    echo "Done" 
    252246  fi 
Note: See TracChangeset for help on using the changeset viewer.