Changeset db49124


Ignore:
Timestamp:
02/14/14 09:31:50 (10 months ago)
Author:
Kris Moore <kris@…>
Branches:
releng/10.0
Children:
1c3c6659
Parents:
0604f47
git-author:
Kris Moore <kris@…> (02/14/14 09:31:10)
git-committer:
Kris Moore <kris@…> (02/14/14 09:31:50)
Message:

Fix adding source / ports when creating new jails

Location:
src-sh/warden
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src-sh/warden/bin/warden

    r58a4795 rdb49124  
    11511151         IP6="OFF" 
    11521152         SRC="NO" 
     1153         SOURCE="NO" 
    11531154         PORTS="NO" 
    11541155         AUTOSTART="NO" 
     
    11681169                          ;; 
    11691170 
    1170              --src) SRC="YES" ;; 
     1171             --src) SRC="YES" ; SOURCE="YES" ;; 
    11711172             --ports) PORTS="YES" ;; 
    11721173             --startauto) AUTOSTART="YES" ;; 
     
    12351236          export IP6 
    12361237          export SRC 
     1238          export SOURCE 
    12371239          export PORTS 
    12381240          export AUTOSTART 
  • src-sh/warden/scripts/backend/createjail.sh

    r84e6670 rdb49124  
    9191# If using a ARCHIVEFILE we can skip this step 
    9292if [ -z "$TEMPLATE" -a -z "$ARCHIVEFILE" ] ; then 
    93   which uname 
    94   uname -r 
    9593  DEFTEMPLATE="`uname -r | cut -d '-' -f 1-2`-${ARCH}" 
    9694  echo "DEF: $DEFTEMPLATE" 
     
    270268  echo "Fetching ports..." 
    271269  mkdir -p "${JAILDIR}/usr/ports" 
    272   cat /usr/sbin/portsnap | sed 's|! -t 0|-z '1'|g' | /bin/sh -s "fetch" "extract" "update" "-p" "${JAILDIR}/usr/ports" >/dev/null 2>/dev/null 
    273   if [ $? -eq 0 ] ; then 
     270  cd ${JAILDIR} 
     271  SYSVER="$(uname -r | cut -d '-' -f 1-2)" 
     272  get_file_from_mirrors "/${SYSVER}/${ARCH}/dist/ports.txz" "ports.txz" "iso" 
     273  if [ $? -ne 0 ] ; then 
     274    echo "Error while downloading the ports tree." 
     275  else 
     276    echo "Extracting ports.. May take a while.." 
     277    tar xvf ports.txz -C "${JAILDIR}" 2>/dev/null 
     278    rm ports.txz 
    274279    echo "Done" 
    275   else 
    276     echo "Failed! Please run \"portsnap fetch extract update\" within the jail." 
    277280  fi 
    278281fi 
Note: See TracChangeset for help on using the changeset viewer.