Changeset 516


Ignore:
Timestamp:
05/12/2011 17:31:18 (13 months ago)
Author:
blee
Message:

merge from trunk confexport locking into confman-1.9, closes #141

Location:
branches/confman-1.9
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/confman-1.9

    • Property svn:mergeinfo changed
      /trunkmerged: 515
  • branches/confman-1.9/confexport.in

    r459 r516  
    4040fi 
    4141 
    42 # This potentially changes the behavior for selecting the REPO_URI 
     42# This changes the behavior of some library functions (e.g. URIs, locks) 
    4343CONF_EXPORT="true" 
    4444 
     
    6464    exec 1>/dev/null 
    6565fi 
     66 
     67confexport_lock_system 
    6668 
    6769umask 077 
     
    102104fi 
    103105 
     106confexport_unlock_system "${system_lock}" 
     107 
    104108echo "Export complete." | conf_logger 
    105109 
    106110conf_cleanExit 0 
    107  
  • branches/confman-1.9/confman.conf.in

    r481 r516  
    2121# The system lockfile 
    2222LOCKFILE="@localstaterundir@/confman.lock" 
     23 
     24# The system lockfile for confexport 
     25CONFEXPORT_LOCKFILE="@localstaterundir@/confexport.lock" 
    2326 
    2427# The script for locking 
  • branches/confman-1.9/confmanlib.sh.in

    r514 r516  
    209209                    ;; 
    210210    esac 
     211} 
     212 
     213function confexport_lock_system { 
     214    "${LOCK}" lock $$ "${CONFEXPORT_LOCKFILE}" || die 
     215} 
     216 
     217function confexport_unlock_system { 
     218    "${LOCK}" unlock $$ "${CONFEXPORT_LOCKFILE}" 
     219} 
     220 
     221function confexport_system_is_locked { 
     222    "${LOCK}" haslock $$ "${CONFEXPORT_LOCKFILE}" 
    211223} 
    212224 
     
    11481160 
    11491161    conf_debug "Removing any system or working copy locks..." >&4 
    1150     conf_wcopy_is_locked && conf_unlock_wcopy ORIGINAL 
    1151     conf_system_is_locked && conf_unlock_system ORIGINAL 
     1162    if ${CONF_EXPORT}; then 
     1163        confexport_system_is_locked && confexport_unlock_system 
     1164    else 
     1165        conf_wcopy_is_locked && conf_unlock_wcopy ORIGINAL 
     1166        conf_system_is_locked && conf_unlock_system ORIGINAL 
     1167    fi 
    11521168         
    11531169        # And this clears any locks we may have created on our working copy: 
Note: See TracChangeset for help on using the changeset viewer.