Changeset 29c3581


Ignore:
Timestamp:
Apr 17, 2013 7:50:25 AM (12 months ago)
Author:
Kris Moore <kris@…>
Branches:
master, 9.1-release, 9.2-release, releng/10.0, releng/10.0.1
Children:
e50ac20
Parents:
89c5083
Message:

Use the correct names to start / stop jails when running from rc.d

Location:
src-sh/warden/scripts/rc.d
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src-sh/warden/scripts/rc.d/shutdown.sh

    r1620346 r29c3581  
    2626for i in `ls -d .*.meta 2>/dev/null` 
    2727do 
    28   if [ ! -e "${i}/ip" ] ; then continue; fi 
    29   jIP="`cat ${i}/ip`" 
     28  JAILNAME=`echo ${i}|sed 's|.meta$||'|sed 's|^.||'` 
    3029 
    31   ${PROGDIR}/scripts/backend/checkstatus.sh "${jIP}" 2>/dev/null 
     30  ${PROGDIR}/scripts/backend/checkstatus.sh "${JAILNAME}" 2>/dev/null 
    3231  if [ "$?" = "0" ] ; then 
    33     echo "Stopping jail (${jIP})" 
    34     warden stop "${jIP}" "FAST" 
     32    echo "Stopping jail (${JAILNAME})" 
     33    warden stop "${JAILNAME}" "FAST" 
    3534  fi 
    3635done 
  • src-sh/warden/scripts/rc.d/startup.sh

    r1620346 r29c3581  
    2626for i in `ls -d .*.meta 2>/dev/null` 
    2727do 
    28   if [ -e "${i}/ip" -a -e "${i}/autostart" ] ; then 
    29    jIP=`cat ${i}/ip` 
    30    echo -e "Starting Jail (${jIP})...\c" 
    31    warden start "${jIP}" >/dev/null 2>/dev/null 
     28  if [ -e "${i}/id" -a -e "${i}/autostart" ] ; then 
     29   JAILNAME=`echo ${i}|sed 's|.meta$||'|sed 's|^.||'` 
     30   echo -e "Starting Jail (${JAILNAME})...\c" 
     31   warden start "${JAILNAME}" >/dev/null 2>/dev/null 
    3232   echo "Done" 
    3333  fi 
Note: See TracChangeset for help on using the changeset viewer.