Ignore:
Timestamp:
12/04/2006 20:38:36 (5 years ago)
Author:
ccowart
Message:

Developed the pull mechanism for confman. It's ready to go into production!

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/confman/confsync.sh

    r121 r123  
    2626tarball=$(conf_fetch) 
    2727tmpdir=$(mktemp -d -t confman) 
     28 
    2829tar -xzf $tarball -C $tmpdir 
    2930rm -rf $tarball 
    30 WORK_PATH="$tmpdir/conf" 
     31WORK_PATH="$tmpdir" 
     32 
     33tar_revision=`conf_revision` 
     34sys_revision=`conf_sysrev` 
     35last_action=$(conf_lastact) 
     36 
     37if [ "x$last_action" = "xinstall" ] && [ $tar_revision -lt $sys_revision ] 
     38then 
     39    echo "Error: File system may be dirty." \ 
     40        "A commit operation is recommended." >&2 
     41    echo "Error: $tarball is out of date. Exiting without making changes." >&2 
     42    conf_markdirty 
     43    rm -rf $tmpdir 
     44    exit 1 
     45fi 
     46 
     47if [ $tar_revision -lt $sys_revision ] ; then 
     48    exit 0 
     49fi 
     50 
     51exit 
    3152 
    3253echo "Sync operation started" >&2 
     
    3960        conf_assemble_sing $file || conf_cleanexit 
    4061done 
     62conf_markclean 
     63conf_recordAction sync 
    4164echo "Sync operation finished successfully" >&2 
    4265 
    4366rm -rf $tmpdir 
    4467 
    45  
Note: See TracChangeset for help on using the changeset viewer.