Changeset 738f740


Ignore:
Timestamp:
04/19/13 07:33:16 (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:
c7d9445
Parents:
d577b69
Message:

Allow us to use %%JAILDIR%% in the user-supplied fstab, will make it more
portable when moving jails between systems

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

Legend:

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

    r5cb55b5 r738f740  
    145145if [ -e "${JMETADIR}/fstab" ] ; then 
    146146   echo "Mounting user-supplied file-systems" 
    147    mount -a -F ${JMETADIR}/fstab 
     147   cp ${JMETADIR}/fstab /tmp/.wardenfstab.$$ 
     148   sed -i '' "s|%%JAILDIR%%|${JAILDIR}|g" /tmp/.wardenfstab.$$ 
     149   mount -a -F /tmp/.wardenfstab.$$ 
     150   rm /tmp/.wardenfstab.$$ 
    148151fi 
    149152 
  • src-sh/warden/scripts/backend/stopjail.sh

    re50ac20 r738f740  
    5959if [ -e "${JMETADIR}/fstab" ] ; then 
    6060   echo "Unmounting user-supplied file-systems" 
    61    umount -a -F ${JMETADIR}/fstab 
     61   cp ${JMETADIR}/fstab /tmp/.wardenfstab.$$ 
     62   sed -i '' "s|%%JAILDIR%%|${JAILDIR}|g" /tmp/.wardenfstab.$$ 
     63   umount -a -F /tmp/.wardenfstab.$$ 
     64   rm /tmp/.wardenfstab.$$ 
    6265fi 
    6366 
Note: See TracChangeset for help on using the changeset viewer.