Changeset 2c39b15


Ignore:
Timestamp:
Sep 15, 2013 5:15:22 PM (7 months ago)
Author:
Kris Moore <kris@…>
Branches:
master, 9.2-release, releng/10.0, releng/10.0.1
Children:
e5240d6
Parents:
dd3cf11
Message:

Remove experimental pbibox functionality, not going to be used.

Location:
src-sh/warden
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • src-sh/warden/bin/warden

    rf4066f6 r2c39b15  
    6262        start - Start a jail 
    6363         stop - Stops a jail 
    64          type - Set the jail type (pbibox|pluginjail|portjail|standard) 
     64         type - Set the jail type (pluginjail|portjail|standard) 
    6565     template - Manage jail templates 
    6666    zfsmksnap - Create a ZFS snapshot of a jail  
     
    376376Lets you set the type of jail to these options: 
    377377 
    378 pbibox: Special container for PBIs using host IP & user directories 
    379378portjail: Jail with access to your home directories and Xorg 
    380379pluginjail: Jail that can be used to install FreeNAS plugins 
     
    476475 
    477476Available Flags: 
    478   -a           (List all jails, including pbi containers) 
    479477  -v           (Verbose listing) 
    480478 
     
    637635  --vanilla                    (Don't install PC-BSD pkgng repo and utilities) 
    638636  --startauto                  (Start this jail at system boot) 
    639   --pbibox                     (Make this a pbi container) 
    640637  --portjail                   (Make this a portjail) 
    641638  --pluginjail                 (Make this a pluginjail) 
     
    879876 
    880877         case $TYPE in 
    881            pbibox) 
    882               rm ${JMETADIR}/jail-pluginjail > /dev/null 2>/dev/null 
    883               rm ${JMETADIR}/jail-portjail >/dev/null 2>/dev/null 
    884               mkpbibox "${JAILDIR}" 
    885               ;; 
    886878           portjail) 
    887879              rm ${JMETADIR}/jail-pluginjail > /dev/null 2>/dev/null 
     
    11821174             --vanilla) VANILLA="YES" ;; 
    11831175             --portjail) JAILTYPE="portjail" ;; 
    1184              --pbibox) JAILTYPE="pbibox" ;; 
    11851176             --pluginjail) JAILTYPE="pluginjail" ; VANILLA="YES" ;;  
    11861177             --linuxjail) JAILTYPE="linuxjail" ; shift 
  • src-sh/warden/scripts/backend/createjail.sh

    rf4066f6 r2c39b15  
    8181 
    8282case "${JAILTYPE}" in 
    83   pbibox) PBIBOX="YES" ;; 
    8483  linuxjail) LINUXJAIL="YES" ;; 
    8584  pluginjail) PLUGINJAIL="YES" ;; 
     
    333332echo "PCBSD_METAPKGSET: warden" > ${JAILDIR}/usr/local/etc/pcbsd.conf 
    334333 
    335 # Check if making a PBI box 
    336 if [ "$PBIBOX" = "YES" ] ; then mkpbibox "${JAILDIR}" ; fi 
    337  
    338334# Check if making a portjail 
    339335if [ "$PORTJAIL" = "YES" ] ; then mkportjail "${JAILDIR}" ; fi 
  • src-sh/warden/scripts/backend/functions.sh

    r29f8f9d r2c39b15  
    4848export WARDENVER 
    4949 
    50 # Dirs to nullfs mount in X jail / pbibox 
     50# Dirs to nullfs mount in X jail 
    5151NULLFS_MOUNTS="/tmp /media" 
    5252X11_MOUNTS="/usr/local/lib/X11/icons /usr/local/lib/X11/fonts /usr/local/etc/fonts" 
     
    183183} 
    184184 
    185 # Mount all the FS needed for a PBI container 
    186 mountpbibox() { 
     185### Mount all needed filesystems for the jail 
     186mountjailxfs() { 
    187187 
    188188  # Update the user files on the portjail 
     
    257257    mount_nullfs ${i} ${JDIR}/${1}${i} 
    258258  done 
    259  
    260   # If this is a portjail, we can stop now 
    261   if [ "$1" = "portjail" ] ; then return ; fi 
    262  
    263   # For PBIs lets mount a few extra things 
    264   for nullfs_mount in ${X11_MOUNTS}; do 
    265     if [ ! -d "${JDIR}/${1}${nullfs_mount}" ] ; then 
    266         continue 
    267     fi 
    268     if is_symlinked_mountpoint ${nullfs_mount}; then 
    269       echo "${nullfs_mount} has symlink as parent, not mounting" 
    270       continue 
    271     fi 
    272  
    273     # If this is already mounted we can skip for now 
    274     isDirMounted "${JDIR}/${1}${nullfs_mount}" && continue 
    275  
    276     echo "Mounting ${JDIR}/${1}${nullfs_mount}" 
    277     mount_nullfs ${nullfs_mount} ${JDIR}/${1}${nullfs_mount} 
    278   done 
    279    
    280 } 
    281  
    282 ### Mount all needed filesystems for the jail 
    283 mountjailxfs() { 
    284   
    285    # Mount the same mount-points as pbibox  
    286    mountpbibox "portjail" 
    287259 
    288260} 
     
    353325  touch ${JMETADIR}/jail-portjail 
    354326} 
    355  
    356 mkpbibox() { 
    357  
    358   if [ -z "${1}" ] ; then return ; fi 
    359  
    360   # KPM - Replace this section with a "mergeuserpw" function 
    361   # Need to be able to merge user accounts from /home on base system 
    362   # into the chroot each time we start it 
    363   ETCFILES="resolv.conf passwd master.passwd spwd.db pwd.db group localtime" 
    364   for file in ${ETCFILES}; do 
    365     rm ${1}/etc/${file} >/dev/null 2>&1 
    366     cp /etc/${file} ${1}/etc/${file} 
    367   done 
    368    
    369   # Need to symlink /home 
    370   chroot ${1} ln -fs /usr/home /home 
    371  
    372   # Make sure we remove our cleartmp rc.d script, causes issues 
    373   [ -e "${1}/etc/rc.d/cleartmp" ] && rm ${1}/etc/rc.d/cleartmp 
    374  
    375   # Flag this type 
    376   touch ${JMETADIR}/jail-pbibox 
    377  
    378 } 
    379  
    380327 
    381328mkpluginjail() { 
  • src-sh/warden/scripts/backend/listjails.sh

    rf4066f6 r2c39b15  
    3434  case "$1" in 
    3535    -v) VERBOSE="YES" ;;  
    36     -a) ALLJAILS="YES" ;;  
    3736     *) JAILS="${JAILS} .$1.meta" ;; 
    3837  esac 
     
    5554  AUTO="Disabled"  
    5655  STATUS="<unknown>" 
    57  
    58   # if not doing a full listing, skip pbi boxes 
    59   if [ "$ALLJAILS" != "YES" -a -e "${i}/jail-pbibox" ] ; then 
    60      continue 
    61   fi 
    6256 
    6357  if [ ! -e "${i}/id" ] ; then  
     
    146140  
    147141  # Figure out the type of jail 
    148   if [ -e "${i}/jail-pbibox" ] ; then 
    149     TYPE="pbibox" 
    150   elif [ -e "${i}/jail-portjail" ] ; then 
     142  if [ -e "${i}/jail-portjail" ] ; then 
    151143    TYPE="portjail" 
    152144  elif [ -e "${i}/jail-pluginjail" ] ; then 
  • src-sh/warden/scripts/backend/startjail.sh

    rf4066f6 r2c39b15  
    276276fi 
    277277 
    278 # If this is a pbibox, we don't really need to start any jail, just  
    279 # need to do some mounts and such 
    280 if [ -e "${JMETADIR}/jail-pbibox" ] ; then  
    281   mountpbibox ${JAILNAME} 
    282   exit 0 
    283 fi 
    284  
    285278# Make sure the jail is NOT already running 
    286279jls | grep ${JAILDIR}$ >/dev/null 2>/dev/null 
  • src-sh/warden/scripts/backend/stopjail.sh

    rf4066f6 r2c39b15  
    3434  echo "ERROR: No jail located at ${JAILDIR}" 
    3535  exit 5 
    36 fi 
    37  
    38 # If this a pbibox, we can just safely unmount its dirs and finish 
    39 if [ -e "${JMETADIR}/jail-pbibox" ] ; then  
    40   umountjailxfs ${JAILNAME}  
    41   exit 0 
    4236fi 
    4337 
Note: See TracChangeset for help on using the changeset viewer.