Changeset 185 for tags/confman-1.5.6a2/confmanlib.sh
- Timestamp:
- 10/22/2007 17:19:50 (5 years ago)
- File:
-
- 1 edited
-
tags/confman-1.5.6a2/confmanlib.sh (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tags/confman-1.5.6a2/confmanlib.sh
r173 r185 47 47 else 48 48 touch ${WORK_PATH}/confman.lock 49 echo $ $> "${WORK_PATH}/confman.lock" #Send PID to the lock to allow for recursive calls49 echo $MY_PID > "${WORK_PATH}/confman.lock" #Send PID to the lock to allow for recursive calls 50 50 return 0 51 51 fi … … 63 63 else 64 64 touch ${WORK_PATH}/confman.lock 65 echo $ $> "${WORK_PATH}/confman.lock" #Send PID to the lock to allow for recursive calls65 echo $MY_PID > "${WORK_PATH}/confman.lock" #Send PID to the lock to allow for recursive calls 66 66 return 0 67 67 fi … … 82 82 sudo touch /var/run/confman.lock 83 83 sudo chmod 666 /var/run/confman.lock 84 sudo echo $ $> "/var/run/confman.lock"85 return 184 sudo echo $MY_PID > "/var/run/confman.lock" 85 return 0 86 86 fi 87 87 } … … 95 95 96 96 function conf_wcopy_locked? { 97 if [ -f ${WORK_PATH}/confman.lock ] 98 then 97 if [ -f ${WORK_PATH}/confman.lock ] 98 then 99 WCOPY_LOCK_PID=`cat ${WORK_PATH}/confman.lock` #gets the PID of the confman instance that created the lock 100 else 101 return 1 102 fi 103 if [ $WCOPY_LOCK_PID = $MY_PID ] 104 then 105 return 1 106 else 99 107 return 0 100 else101 return 1102 108 fi 103 109 } … … 106 112 if [ -f /var/run/confman.lock ] 107 113 then 114 SYSTEM_LOCK_PID=`cat /var/run/confman.lock` #gets the PID of the confman instance that created the lock 115 else 116 return 1 117 fi 118 if [ $SYSTEM_LOCK_PID = $MY_PID ] 119 then 120 return 1 121 else 108 122 return 0 109 else110 return 1111 123 fi 112 124 } … … 417 429 local group=$3 418 430 local mode=$4 419 local workdir=" /"431 local workdir="" 420 432 local directories=`echo "$directory" | sed 's:/: :g'` 421 433 local dir
Note: See TracChangeset
for help on using the changeset viewer.
