Changeset 362 for branches


Ignore:
Timestamp:
06/29/2009 12:49:48 (3 years ago)
Author:
blee
Message:

Merge persistent working copy support for confexport from trunk.

Fixes #31

Location:
branches/confman-1.9
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • branches/confman-1.9

  • branches/confman-1.9/abspath.in

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/confman-1.9/confexport.8

    r333 r362  
    5454will be written to the file specified in CONF_EXPORT_FILE (See 
    5555.Xr confman.conf 5) . 
     56.Pp 
     57A persistent working copy can be specified with CONF_EXPORT_WORK_PATH in 
     58.Xr confman.conf 5 . 
     59This eliminates the performance overhead of repeatedly creating and 
     60destroying temporary working copies. 
    5661.Sh SECURITY CONSIDERATIONS 
    5762Because a tarball with all your configurations can potentially have sensitive 
  • branches/confman-1.9/conflock.in

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/confman-1.9/confman.conf.in

    r326 r362  
    6969CONF_EXPORT_USER="$(whoami)" 
    7070CONF_EXPORT_GROUP="${CONF_GROUP}" 
     71CONF_EXPORT_WORK_PATH="" 
    7172CONF_SSH_KEY="/root/.ssh/id_rsa" 
    7273 
  • branches/confman-1.9/confmanlib.sh.in

    r358 r362  
    196196function conf_export { 
    197197    local tarball="$1" 
    198     WORK_PATH=$(conf_tmp_dir) 
     198 
     199    if [ -z "${CONF_EXPORT_WORK_PATH}" ]; then 
     200        WORK_PATH=$(conf_tmp_dir) 
     201    else 
     202        WORK_PATH="${CONF_EXPORT_WORK_PATH}" 
     203    fi 
     204 
    199205    conf_checkout_tree 
    200206    tar -czf "$tarball" -C "${WORK_PATH}" . 
    201     rm -rf ${WORK_PATH} 
     207 
     208    if [ -z "${CONF_EXPORT_WORK_PATH}" ]; then 
     209        rm -rf ${WORK_PATH} 
     210    fi 
    202211} 
    203212 
Note: See TracChangeset for help on using the changeset viewer.