diff options
author | Daniel Friesel <derf@derf.homelinux.org> | 2009-07-08 18:47:25 +0200 |
---|---|---|
committer | Daniel Friesel <derf@derf.homelinux.org> | 2009-07-08 18:47:25 +0200 |
commit | da82a60fdbee638601875fbbc4ba8260ed1bf267 (patch) | |
tree | c11368a72bd9a888efe51e83ff32ed659ac9b96e /etc/functions/check_ping | |
parent | 99a52ce7a6b7270455c0878e9f368373248a277c (diff) |
Cleanup
Diffstat (limited to 'etc/functions/check_ping')
-rw-r--r-- | etc/functions/check_ping | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/etc/functions/check_ping b/etc/functions/check_ping deleted file mode 100644 index 015af0b..0000000 --- a/etc/functions/check_ping +++ /dev/null @@ -1,21 +0,0 @@ -## vim:ft=zsh -## check_ping - returns true if a host responds to ICMP echo requests -## Usage: check_ping [-6] <host> -typeset -i ipv6 ret - -while [[ $1 == -* ]] { - case $1 in - -6) ipv6=1 ;; - esac - shift -} - -typeset dst=$1 -shift - -if ((ipv6)) { - ping6 -c 1 $dst &> /dev/null -} else { - ping -c 1 $dst &> /dev/null -} -return |