Changeset 365dfc2


Ignore:
Timestamp:
Apr 15, 2013 10:17:08 AM (15 months ago)
Author:
Kris Moore <kris@…>
Branches:
master, 9.1-release, 9.2-release, releng/10.0, releng/10.0.1, releng/10.0.2
Children:
80fe156
Parents:
3c28602
Message:
  • Fix a bug converting jails to new meta format, use unique IDs
File:
1 edited

Legend:

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

    r0988d23 r365dfc2  
    6161     fi 
    6262     # This is an old style jail, lets convert it 
    63      cp ${i}/ip ${i}/id 
    6463     cp ${i}/ip ${i}/ipv4 
     64 
     65     # Get next unique ID 
     66     META_ID=0 
     67     for iDir in `ls -d ${JDIR}/.*.meta 2>/dev/null` 
     68     do 
     69       if [ ! -e "${iDir}/id" ] ; then continue ; fi 
     70       id=`cat ${iDir}/id` 
     71       if [ "${id}" -gt "${META_ID}" ] ; then 
     72          META_ID="${id}" 
     73       fi 
     74     done 
     75     : $(( META_ID += 1 )) 
     76     echo "$META_ID" > ${i}/id 
     77 
    6578  fi 
    6679 
Note: See TracChangeset for help on using the changeset viewer.