Changeset a910d6cd5c3136189524f70bec2cf7d4cc0f3209

Show
Ignore:
Timestamp:
02/27/07 02:57:58 (7 years ago)
Author:
Theo Schlossnagle <jesus@omniti.com>
git-committer:
Theo Schlossnagle <jesus@omniti.com> 1172545078 +0000
git-parent:

[5e79e4c037fae3b96d716a9266b75fd6685ea404]

git-author:
Theo Schlossnagle <jesus@omniti.com> 1172545078 +0000
Message:

add version flag, closes #3

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • zetaback

    r5e79e4c ra910d6c  
    77use Data::Dumper; 
    88 
    9 use vars qw/$CONF %conf $BLOCKSIZE $DEBUG $HOST $BACKUP 
     9use vars qw/%conf $version_string 
     10            $CONF $BLOCKSIZE $DEBUG $HOST $BACKUP 
    1011            $RESTORE $RESTORE_HOST $RESTORE_ZFS $TIMESTAMP 
    1112            $LIST $SUMMARY $SUMMARY_EXT 
    12             $EXPUNGE $NUETERED $ZFS/; 
    13 $CONF = q^/var/spool/zfs_backups/zetaback.conf^; 
     13            $EXPUNGE $NUETERED $ZFS 
     14            $VERSION/; 
     15$version_string = '0.1'; 
     16$CONF = q^/etc/zetaback.conf^; 
    1417$BLOCKSIZE = 1024*64; 
    1518 
     
    3235  "n"       => \$NUETERED, 
    3336  "x"       => \$EXPUNGE, 
     37  "v"       => \$VERSION, 
    3438); 
     39 
     40if($VERSION) { 
     41  print "zetaback: $version_string\n"; 
     42  exit 0; 
     43} 
    3544 
    3645sub parse_config() { 
  • zetaback_agent

    r5e79e4c ra910d6c  
    55use Data::Dumper; 
    66 
    7 my %conf; 
    8 my $CONF = q^/etc/zetaback_agent.conf^; 
    9 use vars qw/$LIST $FULL $SNAP $ZFS $BASE $RESTORE/; 
     7use vars qw/%conf $version_string 
     8            $CONF $LIST $FULL $SNAP $ZFS $BASE $RESTORE $VERSION/; 
     9$version_string = '0.1'; 
     10$CONF = q^/etc/zetaback_agent.conf^; 
    1011 
    1112GetOptions( 
     
    1718  "f=s" => \$FULL, 
    1819  "i=s" => \$BASE, 
     20  "v"   => \$VERSION, 
    1921); 
     22 
     23if($VERSION) { 
     24  print "zetaback_agent: $version_string\n"; 
     25  exit 0; 
     26} 
    2027 
    2128# Read out config in