Changeset 021df693bf0087dac900e2f698d4065c8c2856e7

Show
Ignore:
Timestamp:
07/08/08 15:30:27 (6 years ago)
Author:
Mark Harrison <mark@omniti.com>
git-committer:
Mark Harrison <mark@omniti.com> 1215531027 +0000
git-parent:

[6b9c9cc891ad219b3f22663481dfaedb6d1ea273]

git-author:
Mark Harrison <mark@omniti.com> 1215531027 +0000
Message:

Removing hardcoded reference to /opt/resmon

git-svn-id: https://labs.omniti.com/resmon/trunk@140 8c0face9-b7db-6ec6-c4b3-d5f7145c7d55

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • lib/Resmon/Updater.pm

    r6b9c9cc r021df69  
    33use File::Find; 
    44use IO::Socket; 
    5  
    6 # Currently hardcoded. There is probably a good way to work out what the 
    7 # dir is from how we were called. 
    8 my $resmondir='/opt/resmon'; 
    95 
    106my $assess; 
     
    139my %times; 
    1410my $debug; 
     11my $resmondir; 
    1512 
    1613sub update { 
     
    2320    # whether there were any files updated or not. 
    2421    $debug = shift; 
     22 
     23    $resmondir = shift; 
    2524 
    2625    # Check for subversion 
  • resmon

    r6b9c9cc r021df69  
    3131if ($update) { 
    3232    use Resmon::Updater; 
    33     exit(Resmon::Updater::update($debug)); 
     33    (my $resmondir = $0) =~ s/\/?[^\/]+$//; 
     34    exit(Resmon::Updater::update($debug, $resmondir)); 
    3435} 
    3536