diff options
author | Peter Palfrader <peter@palfrader.org> | 2002-08-12 03:28:06 +0000 |
---|---|---|
committer | Peter Palfrader <peter@palfrader.org> | 2002-08-12 03:28:06 +0000 |
commit | 5b7ef796565747adb5113ec08d862c31631c1255 (patch) | |
tree | 7c9abd94b36b1718658a97d82f32dedfeb922cc8 /pingd | |
parent | e73e36647d12566723e50d85c9ffaefa48a49265 (diff) |
Have --quiet
Diffstat (limited to 'pingd')
-rwxr-xr-x | pingd | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -3,7 +3,7 @@ $| = 1; # (c) 2002 Peter Palfrader <peter@palfrader.org> -# $Id: pingd,v 1.60 2002/08/12 03:06:53 weasel Exp $ +# $Id: pingd,v 1.61 2002/08/12 03:28:06 weasel Exp $ # =pod @@ -162,6 +162,10 @@ DIRECTORY section below. Verbose mode. Causes B<pingd> to print debugging messages about its progress. +=item B<--quiet> + +Quiet mode. Be even more quient than normally. + =item B<--help> Print a short help and exit sucessfully. @@ -545,6 +549,7 @@ if (!GetOptions ( 'detach' => \$params->{'detach'}, 'process' => \$params->{'process'}, 'basedir' => \$params->{'basedir'}, + 'quiet' => \$params->{'quiet'}, )) { die ("$PROGRAM_NAME: Usage: $PROGRAM_NAME [-fwhv]\n"); }; @@ -577,6 +582,7 @@ if ($params->{'version'}) { print ("http://savannah.gnu.org/projects/echolot/\n"); exit 0; }; +$params->{'quiet'} = undef if ($params->{'verbose'}); my $COMMAND = shift @ARGV; die ("command required\n") unless defined $COMMAND; @@ -620,7 +626,7 @@ if ($COMMAND eq 'add' || $COMMAND eq 'delete') { if pid_exists(); make_dirs(); if ($params->{'detach'}) { - print "Detaching.\n"; + print "Detaching.\n" unless ($params->{'quiet'}); exit(0) if (fork()); POSIX::setsid(); exit(0) if (fork()); |