Changeset 22842a8


Ignore:
Timestamp:
04/15/13 09:15:45 (17 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, releng/10.0.3
Children:
3c28602
Parents:
8470ab3
Message:

Fix bugs checking for updates to a jail and showing MB usage on disk

Location:
src-sh/warden/scripts/backend
Files:
2 edited

Legend:

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

    r0988d23 r22842a8  
    4141  for i in `ls -d .*.meta` 
    4242  do 
     43    JAILNAME=`echo ${i}|sed 's|.meta$||'|sed 's|^.||'` 
    4344    HOST="`cat ${i}/host`" 
    4445    set_warden_metadir 
     
    4950  
    5051    # Check for meta-pkg updates 
    51     pc-metapkgmanager --chroot ${JDIR}/${HOST} checkup 
     52    pc-metapkgmanager --chroot ${JDIR}/${JAILNAME} checkup 
    5253 
    5354    # Check for system-updates 
    54     chroot ${JDIR}/${HOST} cat /usr/sbin/freebsd-update | sed 's|! -t 0|-z '1'|g' | /bin/sh -s 'fetch' 
     55    chroot ${JDIR}/${JAILNAME} cat /usr/sbin/freebsd-update | sed 's|! -t 0|-z '1'|g' | /bin/sh -s 'fetch' 
    5556  done 
    5657else 
     
    6263  fi 
    6364 
    64    echo "Checking for jail updates to ${HOST}..." 
     65   echo "Checking for jail updates to ${JAILNAME}..." 
    6566   echo "################################################" 
    6667   # Check for meta-pkg updates 
    67    pc-metapkgmanager --chroot ${JDIR}/${HOST} checkup 
     68   pc-metapkgmanager --chroot ${JDIR}/${JAILNAME} checkup 
    6869 
    6970   # Check for system-updates 
    70    chroot ${JDIR}/${HOST} cat /usr/sbin/freebsd-update | sed 's|! -t 0|-z '1'|g' | /bin/sh -s 'fetch' 
     71   chroot ${JDIR}/${JAILNAME} cat /usr/sbin/freebsd-update | sed 's|! -t 0|-z '1'|g' | /bin/sh -s 'fetch' 
    7172fi 
  • src-sh/warden/scripts/backend/details.sh

    r0988d23 r22842a8  
    5353isDirZFS "${JAILDIR}" "1" 
    5454if [ $? -eq 0 ] ; then  
    55    tank=`getZFSTank "${JAILDIR}"` 
    56    diskUsage=`df -m | grep -w ${tank}${JAILDIR}$ | awk '{print $3}'` 
     55   tank=`getZFSDataset "${JAILDIR}"` 
     56   diskUsage=`df -m | grep -w "^${tank} " | awk '{print $3}'` 
    5757else 
    5858   diskUsage=`du -c -x -m ${JAILDIR} 2>/dev/null | grep total | tail -n 1 | awk '{print $1}'` 
Note: See TracChangeset for help on using the changeset viewer.