Changeset 865978fe


Ignore:
Timestamp:
02/27/14 14:56:38 (8 months ago)
Author:
Kris Moore <kris@…>
Branches:
master, releng/10.0.1, releng/10.0.2, releng/10.0.3, releng/10.1
Children:
14b47f0
Parents:
65100f3
Message:

Cleanup some of the old locking fixes

File:
1 edited

Legend:

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

    r65100f3 r865978fe  
    5959} 
    6060 
    61 do_mount_lock() { 
    62  
    63    # At this point we have waited 15 seconds, if another mount still hasn't finished 
    64    # by now then there are other serious problems 
    65    if [ $1 -gt 10 ] ; then 
    66       exit 1 
    67    fi 
    68  
    69    # Check if we have another mount going now 
    70    if [ -e "${MNTLOCK}" ] ; then 
    71       pgrep -qF ${MNTLOCK} 2>/dev/null 
    72       if [ $? -ne 0 ] ; then 
    73          # Expired run it seems 
    74          rm -f ${MNTLOCK} 2>/dev/null 
    75       else 
    76          # Another mount is running, wait a bit for it to finish 
    77          sleep 1.5 
    78          do_mount_lock "`expr $1 + 1`" 
    79          return 
    80       fi 
    81    fi 
    82  
    83    echo "$$" > ${MNTLOCK} 
    84 } 
    85  
    86 undo_mount_lock() { 
    87   rm -f ${MNTLOCK} >/dev/null 2>/dev/null 
    88 } 
    89  
    9061mount_dirs() { 
    9162 
Note: See TracChangeset for help on using the changeset viewer.