diff options
author | Peter Palfrader <peter@palfrader.org> | 2002-07-06 23:22:25 +0000 |
---|---|---|
committer | Peter Palfrader <peter@palfrader.org> | 2002-07-06 23:22:25 +0000 |
commit | 62a747b61612a08effdd95a0b6f3085fb8c3b335 (patch) | |
tree | 775767b24dcea02276b13e7dce2a8eb99b491c87 | |
parent | e05009a30b2480f2a5af68c5ceb47451a787cdc3 (diff) |
Have --version
-rwxr-xr-x | pingd | 18 |
1 files changed, 17 insertions, 1 deletions
@@ -1,7 +1,7 @@ #!/usr/bin/perl -wT # (c) 2002 Peter Palfrader <peter@palfrader.org> -# $Id: pingd,v 1.19 2002/07/06 21:35:04 weasel Exp $ +# $Id: pingd,v 1.20 2002/07/06 23:22:25 weasel Exp $ # =pod @@ -140,6 +140,10 @@ Verbose mode. Causes B<pingd> to print debugging messages about its progress. Print a short help and exit sucessfully. +=item --version + +Print version number and exit sucessfully. + =item --nohup Usefull only when passwd with the B<add>, B<set>, B<setremailercaps>, @@ -222,6 +226,9 @@ $ENV{'PATH'} = '/bin:/usr/bin'; delete @ENV{'IFS', 'CDPATH', 'ENV', 'BASH_ENV'}; +my $VERSION = '2.0beta1'; + + my $redirected_stdio = 0; sub setSigHandlers() { @@ -441,6 +448,7 @@ my $params; Getopt::Long::config('bundling'); if (!GetOptions ( 'help' => \$params->{'help'}, + 'version' => \$params->{'version'}, 'verbose' => \$params->{'verbose'}, 'nohup' => \$params->{'nohup'}, 'detach' => \$params->{'detach'}, @@ -450,6 +458,14 @@ if (!GetOptions ( if ($params->{'help'}) { print ("Usage: $PROGRAM_NAME [options] command\n"); print ("See man pingd or perldoc pingd for more info.\n"); + print ("echolot $VERSION - (c) 2002 Peter Palfrader <peter\@palfrader.org>\n"); + print ("http://savannah.gnu.org/projects/echolot/\n"); + exit 0; +}; +if ($params->{'version'}) { + print ("echolot $VERSION\n"); + print ("(c) 2002 Peter Palfrader <peter\@palfrader.org>\n"); + print ("http://savannah.gnu.org/projects/echolot/\n"); exit 0; }; |