Ignore:
Timestamp:
02/28/14 12:58:11 (5 months ago)
Author:
Kris Moore <kris@…>
Branches:
master, releng/10.0.1, releng/10.0.2
Children:
4f9718b
Parents:
0130b27
Message:

Fix a bug in warden doing pkgng bootstrap. Now use the jails "freebsd-version" command
to figure out which release we are boot-strapping for. This means it will only
boot strap on 10.0 and later, but that is the only real repos we have active anyway.

File:
1 edited

Legend:

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

    r13a6b08 rc2b5aad  
    791791  local outfile="${2}" 
    792792 
    793   local release="$(uname -r | cut -d '-' -f 1-2)" 
     793  if [ ! -e "${jaildir}/bin/freebsd-version" ] ; then 
     794     echo "Missing /bin/freebsd-version in jail.." 
     795     echo "PKG bootstrap can only be done on 10.0 and higher, skipping..." 
     796     return 1 
     797  fi 
     798 
     799  local release="`${jaildir}/bin/freebsd-version | cut -d '-' -f 1-2`" 
    794800  local arch="$(uname -m)" 
    795801 
     
    838844  local outfile="${2}" 
    839845 
    840   local release="$(uname -r | cut -d '-' -f 1-2)" 
     846  if [ ! -e "${jaildir}/bin/freebsd-version" ] ; then 
     847     echo "Missing /bin/freebsd-version in jail.." 
     848     echo "PKG bootstrap can only be done on 10.0 and higher, skipping..." 
     849     return 0 
     850  fi 
     851 
     852  local release="`${jaildir}/bin/freebsd-version | cut -d '-' -f 1-2`" 
    841853  local arch="$(uname -m)" 
    842854 
     
    911923    jailtype="standard" 
    912924  fi 
    913   local release="$(uname -r | cut -d '-' -f 1-2)" 
     925 
     926  if [ ! -e "${jaildir}/bin/freebsd-version" ] ; then 
     927     echo "Missing /bin/freebsd-version in jail.." 
     928     echo "PKG bootstrap can only be done on 10.0 and higher, skipping..." 
     929     return 1 
     930  fi 
     931 
     932  local release="`${jaildir}/bin/freebsd-version | cut -d '-' -f 1-2`" 
    914933  local arch="$(uname -m)" 
    915934 
     
    923942 
    924943  mkdir -p ${jaildir}/usr/local/etc 
    925   pubcert="/usr/local/etc/pkg-pubkey.cert" 
    926  
    927   cp "${pubcert}" ${jaildir}/usr/local/etc 
    928   install_pc_extractoverlay "${jaildir}" 
     944 
    929945 
    930946  ${ffunc} "${jaildir}" "${jaildir}/bootstrap-pkgng" 
Note: See TracChangeset for help on using the changeset viewer.