Changeset 025ac94


Ignore:
Timestamp:
02/10/14 14:26:30 (6 months ago)
Author:
Kris Moore <kris@…>
Branches:
releng/10.0
Children:
b7769fb
Parents:
8d4ed043
Message:

Backport some files to pbi container creation for releng/10.0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src-sh/pbi-manager/pbime/pbimount

    rc5538f0 r025ac94  
    33NULLFS="/usr/pbi/.mount_nullfs" 
    44MNTLOCK="/usr/pbi/.mntLock" 
    5 MNTSLEEP="sleep 0.1" 
     5MNTSLEEP="sleep 0.18" 
    66 
    77is_mounted() { 
     
    9797   is_mounted "${pDir}/virtbase/usr/local" || ($NULLFS ${1}/local "${pDir}/virtbase/usr/local" ; $MNTSLEEP ) 
    9898   is_mounted "${pDir}/virtbase/var/run" || ($NULLFS ${pDir}/run "${pDir}/virtbase/var/run" ; $MNTSLEEP ) 
    99    is_mounted "${pDir}/virtbase/compat/linux" || ($NULLFS ${1}/linux "${pDir}/virtbase/compat/linux" ; $MNTSLEEP ) 
     99   if [ -d "/var/run/dbus" ] ; then 
     100     is_mounted "${pDir}/virtbase/var/run/dbus" || ( mkdir ${pDir}/virtbase/var/run/dbus 2>/dev/null ; $NULLFS /var/run/dbus "${pDir}/virtbase/var/run/dbus" ; $MNTSLEEP ) 
     101   fi 
     102 
     103   # If the host has Linux compat 
     104   if [ -d "${pDir}/virtbase/compat/linux" ] ; then 
     105     is_mounted "${pDir}/virtbase/compat/linux" || ($NULLFS ${1}/linux "${pDir}/virtbase/compat/linux" ; $MNTSLEEP ) 
     106   fi 
    100107 
    101108   # Sort out the items to mount into the PBI container 
    102    for i in `mount | grep -e "(zfs" -e "(smbfs" -e "(nfs" -e "(ufs" -e "(msdos" -e "(ntfs" | grep -e "on /" | grep -v "/usr/jails" | grep -v "/usr/pbi" | grep -v "/usr/local" | awk '{print $3}'` 
     109   for i in `mount | grep -e "(zfs" -e "(smbfs" -e "(nfs" -e "(ufs" -e "(msdos" -e "(ntfs" -e "(fusefs" | grep -e "on /" | grep -v "/usr/jails" | grep -v "/usr/pbi" | grep -v "/usr/local" | awk '{print $3}'` 
    103110   do 
    104111     if [ "$i" = "/" ] ; then continue ; fi 
     
    107114 
    108115   # Mount any system-wide fonts / cursors / icons into the PBI container 
    109    if [ -d "${pDir}/virtbase/usr/local/etc/fonts" ] ; then 
     116   if [ -d "${pDir}/virtbase/usr/local/etc/fonts" -a -d "/usr/local/etc/fonts" ] ; then 
    110117      is_mounted "${pDir}/virtbase/usr/local/etc/fonts" || ($NULLFS /usr/local/etc/fonts "${pDir}/virtbase/usr/local/etc/fonts" ; $MNTSLEEP ) 
    111118   fi 
    112    if [ -d "${pDir}/virtbase/usr/local/lib/X11/fonts" ] ; then 
     119   if [ -d "${pDir}/virtbase/usr/local/lib/X11/fonts" -a -d "/usr/local/lib/X11/fonts" ] ; then 
    113120      is_mounted "${pDir}/virtbase/usr/local/lib/X11/fonts" || ($NULLFS /usr/local/lib/X11/fonts "${pDir}/virtbase/usr/local/lib/X11/fonts" ; $MNTSLEEP ) 
    114121   fi 
    115    if [ -d "${pDir}/virtbase/usr/local/lib/X11/icons" ] ; then 
     122   if [ -d "${pDir}/virtbase/usr/local/lib/X11/icons" -a -d "/usr/local/lib/X11/icons" ] ; then 
    116123      is_mounted "${pDir}/virtbase/usr/local/lib/X11/icons" || ($NULLFS /usr/local/lib/X11/icons "${pDir}/virtbase/usr/local/lib/X11/icons" ; $MNTSLEEP ) 
    117124   fi 
    118    if [ -d "${pDir}/virtbase/usr/local/share/icons" ] ; then 
     125   if [ -d "${pDir}/virtbase/usr/local/share/icons" -a -d "/usr/local/share/icons" ] ; then 
    119126      is_mounted "${pDir}/virtbase/usr/local/share/icons" || ($NULLFS /usr/local/share/icons "${pDir}/virtbase/usr/local/share/icons" ; $MNTSLEEP ) 
    120127   fi 
Note: See TracChangeset for help on using the changeset viewer.