diff options
author | Sven Nierlein <sven@consol.de> | 2013-09-14 17:36:20 (GMT) |
---|---|---|
committer | Sven Nierlein <sven@consol.de> | 2013-09-14 17:36:20 (GMT) |
commit | 7b122f13dbb0bd714b47e1181ba36bfbb3bd7658 (patch) | |
tree | e204afb0058a14c248dc9bcca1199b525cd2c706 /NPTest.pm | |
parent | 32ec6265a4161790bc3a548b0d2c1237e30b0d1a (diff) | |
download | monitoring-plugins-7b122f13dbb0bd714b47e1181ba36bfbb3bd7658.tar.gz |
tests: move ipv6 detection into NPTest module
Diffstat (limited to 'NPTest.pm')
-rw-r--r-- | NPTest.pm | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -645,6 +645,16 @@ sub testCmd { | |||
645 | return $object; | 645 | return $object; |
646 | } | 646 | } |
647 | 647 | ||
648 | # do we have ipv6 | ||
649 | sub has_ipv6 { | ||
650 | # assume ipv6 if a ping6 to labs.consol.de works | ||
651 | `ping6 -c 1 2a03:3680:0:2::21 2>&1`; | ||
652 | if($? == 0) { | ||
653 | return 1; | ||
654 | } | ||
655 | return; | ||
656 | } | ||
657 | |||
648 | 1; | 658 | 1; |
649 | # | 659 | # |
650 | # End of File | 660 | # End of File |