blob: 3029ac4f8e4b51f86be00b3d5b321606024e2aaa (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
$NetBSD: patch-ad,v 1.2 2000/07/13 15:34:13 abs Exp $
--- webnocol/webnocol.cgi.orig Thu Jul 13 15:46:34 2000
+++ webnocol/webnocol.cgi Thu Jul 13 15:45:49 2000
@@ -646,11 +646,21 @@
# e.g. on Sun's use '/usr/sbin/ping -s DEVICE 500 3' if you are not using
# multiping
sub doTroubleShoot {
- local ($traceroute) = "/usr/local/bin/traceroute -m 15 DEVICE";
+ local (@traceroutepaths) = ('/usr/sbin', '/usr/local/bin');
+ local ($traceroute) = "traceroute -m 15 DEVICE";
local ($ping) = "$nocolroot/bin/multiping -c 3 -i 2 DEVICE"; # check_this
local ($nslookup) = "nslookup -query=any DEVICE";
local ($nslookup) = ($siteaddr =~ /^[\d\.]+$/) ?
"nslookup DEVICE" : "nslookup -query=any DEVICE";
+
+ foreach (@traceroutepaths)
+ {
+ if ( -x "$_/traceroute")
+ {
+ $traceroute = "$_/traceroute";
+ last;
+ }
+ }
local ($subcmd);
local (%cmdlist) = ("ping", $ping, "traceroute", $traceroute,
|