]> git.michaelhowe.org Git - packages/a/afs-monitor.git/commitdiff
Update binary search logic to look in PATH as a fallback
authorRuss Allbery <rra@stanford.edu>
Sun, 12 Dec 2010 20:03:00 +0000 (12:03 -0800)
committerRuss Allbery <rra@stanford.edu>
Sun, 12 Dec 2010 20:03:00 +0000 (12:03 -0800)
The vos binary is installed in sbin by the Red Hat packages and the
default upstream installation rules, so check in sbin as well as bin.
Patch from Daniel Scott.  Also fall back, for all AFS binaries, to
using PATH if the binary can't be found in known locations.

Also checks for vos in /usr/local/sbin/vos.

NEWS
check_afs_bos
check_afs_quotas
check_afs_rxdebug
check_afs_space
check_afs_udebug

diff --git a/NEWS b/NEWS
index 48073dcf0fce0b5160a7bafd32e0fda242e53217..6cf926a19ece21709fee4622971aa106a499dad1 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,12 @@
                      User-Visible afs-monitor Changes
 
+afs-monitor 2.2 (unreleased)
+
+    The vos binary is installed in sbin by the Red Hat packages and the
+    default upstream installation rules, so check in sbin as well as bin.
+    Patch from Daniel Scott.  Also fall back, for all AFS binaries, to
+    using PATH if the binary can't be found in known locations.
+
 afs-monitor 2.1 (2010-12-08)
 
     Fix a bug in check_afs_space introduced in the previous release with
index 43be08c7104c7eb7b813764edf1797772024ff5a..b3ff46cc395e36f32b77e8adb200394b1a17287c 100755 (executable)
@@ -33,7 +33,7 @@ use Getopt::Long qw(GetOptions);
 # The full path to bos.  Make sure that this is on local disk so that
 # monitoring doesn't have an AFS dependency.
 our ($BOS) = grep { -x $_ } qw(/usr/bin/bos /usr/local/bin/bos);
-$BOS ||= '/usr/bin/bos';
+$BOS ||= 'bos';
 
 # The default timeout in seconds (implemented by alarm) for rxdebug.
 our $TIMEOUT = 10;
index 6d63039d9a000df6cb7f16f424cd9c0c5e388988..4c9d6309fe85633dcafb65b6872bbc8335e9c250 100755 (executable)
@@ -50,8 +50,9 @@ our $TIMEOUT = 300;
 
 # The full path to vos.  Make sure that this is on local disk so that
 # monitoring doesn't have an AFS dependency.
-our ($VOS) = grep { -x $_ } qw(/usr/bin/vos /usr/local/bin/vos /usr/sbin/vos);
-$VOS ||= '/usr/bin/vos';
+our ($VOS) = grep { -x $_ }
+    qw(/usr/bin/vos /usr/sbin/vos /usr/local/bin/vos /usr/local/sbin/vos);
+$VOS ||= 'vos';
 
 ##############################################################################
 # AFS operations
index 6f55b4b9786d873d6078bbab16005661cefd5fa2..a436d4c3ad136a1008ee8f2a6e413455c13fbc40 100755 (executable)
@@ -44,7 +44,7 @@ our $TIMEOUT = 60;
 our ($RXDEBUG) = grep { -x $_ }
     qw(/usr/bin/rxdebug /usr/sbin/rxdebug /usr/local/bin/rxdebug
        /usr/local/sbin/rxdebug);
-$RXDEBUG ||= '/usr/bin/rxdebug';
+$RXDEBUG ||= 'rxdebug';
 
 ##############################################################################
 # Implementation
index 495d53bbc6bc2a4496b234a245f14b4c9399ed15..7dd2da97062eb385d309fc75da885b6f9d32b171 100755 (executable)
@@ -49,8 +49,9 @@ our $TIMEOUT = 300;
 
 # The full path to vos.  Make sure that this is on local disk so that
 # monitoring doesn't have an AFS dependency.
-our ($VOS) = grep { -x $_ } qw(/usr/bin/vos /usr/local/bin/vos /usr/sbin/vos);
-$VOS ||= '/usr/bin/vos';
+our ($VOS) = grep { -x $_ }
+    qw(/usr/bin/vos /usr/sbin/vos /usr/local/bin/vos /usr/local/sbin/vos);
+$VOS ||= 'vos';
 
 ##############################################################################
 # Implementation
index a48ba76b7b8a127cf5ab04fc69baa183362d1b46..62329012c69dfecac78dad582e4857dbea45c8a5 100755 (executable)
@@ -34,7 +34,7 @@ our $TIMEOUT = 10;
 # The full path to udebug.  Make sure that this is on local disk so that
 # monitoring doesn't have an AFS dependency.
 our ($UDEBUG) = grep { -x $_ } qw(/usr/bin/udebug /usr/local/bin/udebug);
-$UDEBUG ||= '/usr/bin/udebug';
+$UDEBUG ||= 'udebug';
 
 ##############################################################################
 # Implementation