Changeset 6542c9a


Ignore:
Timestamp:
01/31/14 10:31:07 (11 months ago)
Author:
Kris Moore <kris@…>
Branches:
master, releng/10.0.1, releng/10.0.2, releng/10.0.3, releng/10.1
Children:
c494b93, bfa665a
Parents:
1f245a6
Message:

Cleanup pbimounter a bit more, pause after doing nullfs mounts, and checking for mount-points

File:
1 edited

Legend:

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

    rc031385 r6542c9a  
    33NULLFS="/usr/pbi/.mount_nullfs" 
    44MNTLOCK="/usr/pbi/.mntLock" 
    5 MNTSLEEP="sleep 0.2" 
     5MNTSLEEP="sleep 0.1" 
    66 
    77is_mounted() { 
    88   if [ ! -d "${1}" ] ; then return 1; fi 
     9   sync 
    910   mount | grep -q "on ${1} ("  
    1011   return $? 
     
    9192 
    9293   # Check some of the common items to mount into the PBI container 
    93    is_mounted "${pDir}/virtbase" || ( $NULLFS / "${pDir}/virtbase" ; check_nvidia_linux "${1}" ) 
     94   is_mounted "${pDir}/virtbase" || ( $NULLFS / "${pDir}/virtbase" ; $MNTSLEEP ; check_nvidia_linux "${1}" ) 
    9495 
    95    is_mounted "${pDir}/virtbase/dev" || mount -t devfs devfs "${pDir}/virtbase/dev" 
    96    is_mounted "${pDir}/virtbase/usr/local" || ($MNTSLEEP ; $NULLFS ${1}/local "${pDir}/virtbase/usr/local" ) 
    97    is_mounted "${pDir}/virtbase/var/run" || ($MNTSLEEP ; $NULLFS ${pDir}/run "${pDir}/virtbase/var/run" ) 
    98    is_mounted "${pDir}/virtbase/compat/linux" || ($MNTSLEEP ; $NULLFS ${1}/linux "${pDir}/virtbase/compat/linux" ) 
     96   is_mounted "${pDir}/virtbase/dev" || (mount -t devfs devfs "${pDir}/virtbase/dev" ; $MNTSLEEP ) 
     97   is_mounted "${pDir}/virtbase/usr/local" || ($NULLFS ${1}/local "${pDir}/virtbase/usr/local" ; $MNTSLEEP ) 
     98   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 ) 
    99100 
    100101   # Sort out the items to mount into the PBI container 
     
    102103   do 
    103104     if [ "$i" = "/" ] ; then continue ; fi 
    104      is_mounted "${pDir}/virtbase${i}" || ($MNTSLEEP ; $NULLFS ${i} "${pDir}/virtbase${i}" ) 
     105     is_mounted "${pDir}/virtbase${i}" || ($NULLFS ${i} "${pDir}/virtbase${i}" ; $MNTSLEEP ) 
    105106   done 
    106107 
    107108   # Mount any system-wide fonts / cursors / icons into the PBI container 
    108109   if [ -d "${pDir}/virtbase/usr/local/etc/fonts" ] ; then 
    109       is_mounted "${pDir}/virtbase/usr/local/etc/fonts" || ($MNTSLEEP ; $NULLFS /usr/local/etc/fonts "${pDir}/virtbase/usr/local/etc/fonts" ) 
     110      is_mounted "${pDir}/virtbase/usr/local/etc/fonts" || ($NULLFS /usr/local/etc/fonts "${pDir}/virtbase/usr/local/etc/fonts" ; $MNTSLEEP ) 
    110111   fi 
    111112   if [ -d "${pDir}/virtbase/usr/local/lib/X11/fonts" ] ; then 
    112       is_mounted "${pDir}/virtbase/usr/local/lib/X11/fonts" || ($MNTSLEEP ; $NULLFS /usr/local/lib/X11/fonts "${pDir}/virtbase/usr/local/lib/X11/fonts" ) 
     113      is_mounted "${pDir}/virtbase/usr/local/lib/X11/fonts" || ($NULLFS /usr/local/lib/X11/fonts "${pDir}/virtbase/usr/local/lib/X11/fonts" ; $MNTSLEEP ) 
    113114   fi 
    114115   if [ -d "${pDir}/virtbase/usr/local/lib/X11/icons" ] ; then 
    115       is_mounted "${pDir}/virtbase/usr/local/lib/X11/icons" || ($MNTSLEEP ; $NULLFS /usr/local/lib/X11/icons "${pDir}/virtbase/usr/local/lib/X11/icons" ) 
     116      is_mounted "${pDir}/virtbase/usr/local/lib/X11/icons" || ($NULLFS /usr/local/lib/X11/icons "${pDir}/virtbase/usr/local/lib/X11/icons" ; $MNTSLEEP ) 
    116117   fi 
    117118   if [ -d "${pDir}/virtbase/usr/local/share/icons" ] ; then 
    118       is_mounted "${pDir}/virtbase/usr/local/share/icons" || ($MNTSLEEP ; $NULLFS /usr/local/share/icons "${pDir}/virtbase/usr/local/share/icons" ) 
     119      is_mounted "${pDir}/virtbase/usr/local/share/icons" || ($NULLFS /usr/local/share/icons "${pDir}/virtbase/usr/local/share/icons" ; $MNTSLEEP ) 
    119120   fi 
    120121 
    121122   # Check if we need to mount linprocfs in the PBI container 
    122123   if [ -d "${pDir}/virtbase/compat/linux/proc" ] ; then 
    123       is_mounted "${pDir}/virtbase/compat/linux/proc" || mount -t linprocfs linproc "${pDir}/virtbase/compat/linux/proc" 
     124      is_mounted "${pDir}/virtbase/compat/linux/proc" || (mount -t linprocfs linproc "${pDir}/virtbase/compat/linux/proc" ; $MNTSLEEP ) 
    124125   fi 
    125126 
    126127   undo_mount_lock 
    127128 
     129   sleep 0.2 
    128130   sync 
    129131 
    130    sleep 0.1 
    131132   # Copy over the system command 
    132133   cp /usr/pbi/.pbisyscmd "${pDir}/virtbase/usr/local/bin/pbisyscmd" 
Note: See TracChangeset for help on using the changeset viewer.