Changeset 373 for trunk/confmanlib.sh.in


Ignore:
Timestamp:
07/02/2009 14:10:41 (3 years ago)
Author:
blee
Message:

Replace WCLOCKFILE global variable with function conf_wcopy_lockfile.

See #35

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/confmanlib.sh.in

    r365 r373  
    2929REPO_ACTION="${REPO_DB}/last_action" 
    3030REPO_SYNC_STATE="${REPO_DB}/state" 
    31 WCLOCKFILE="${WORK_PATH}/confman.lock" 
    3231METADIR="${WORK_PATH}/meta" 
    3332RECIPEDIR="${METADIR}/recipes" 
     
    8584 
    8685# Functions for locking and unlocking both the system and the working copy 
     86function conf_wcopy_lockfile { 
     87    echo "${WORK_PATH}/confman.lock" 
     88} 
     89 
    8790function conf_lock_wcopy { 
    88     ${LOCK} lock $$ "$WCLOCKFILE" || exit 1 
     91    ${LOCK} lock $$ $(conf_wcopy_lockfile) || exit 1 
    8992} 
    9093 
    9194function conf_unlock_wcopy { 
    92     ${LOCK} unlock $$ "$WCLOCKFILE" 
     95    ${LOCK} unlock $$ $(conf_wcopy_lockfile) 
    9396} 
    9497 
    9598function conf_wcopy_is_locked { 
    96     ${LOCK} haslock $$ "$WCLOCKFILE" 
     99    ${LOCK} haslock $$ $(conf_wcopy_lockfile) 
    97100} 
    98101 
Note: See TracChangeset for help on using the changeset viewer.