From hg@cally.queue.to  Wed Feb  6 15:03:44 2002
Return-Path: <hg@cally.queue.to>
Received: from tamqfl1-ar1-201-118.biz.dsl.gtei.net (tamqfl1-ar1-201-118.biz.dsl.gtei.net [4.35.201.118])
	by hub.freebsd.org (Postfix) with SMTP id 8E62637B427
	for <FreeBSD-gnats-submit@freebsd.org>; Wed,  6 Feb 2002 15:03:42 -0800 (PST)
Received: (qmail 23848 invoked from network); 6 Feb 2002 23:03:38 -0000
Received: from cally.queue.to (172.16.0.6)
  by pickle.queue.to with SMTP; 6 Feb 2002 23:03:38 -0000
Received: (qmail 26907 invoked by uid 1000); 6 Feb 2002 23:03:38 -0000
Message-Id: <20020206230338.26906.qmail@cally.queue.to>
Date: 6 Feb 2002 23:03:38 -0000
From: Howard Goldstein <hg@n2wx.ampr.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc: hg@cally.queue.to
Subject: dhclient always in -q quiet mode (PATCH ENCLOSED)
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         34676
>Category:       bin
>Synopsis:       dhclient always in -q quiet mode (PATCH ENCLOSED)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    mbr
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Feb 06 15:10:02 PST 2002
>Closed-Date:    Sat Jun 26 10:57:46 GMT 2004
>Last-Modified:  Sat Jun 26 10:57:46 GMT 2004
>Originator:     Howard Goldstein
>Release:        FreeBSD 4.5-STABLE i386
>Organization:
>Environment:
System: FreeBSD cally.queue.to 4.5-STABLE FreeBSD 4.5-STABLE #0: Tue Feb 5 19:09:00 EST 2002 hg@reality.queue.to:/usr/obj/usr/src/sys/CALLY i386

4.5-stable cvsupped around 4 feb 02
	
>Description:
	
dhclient acts like it's permanently in quiet mode (-q option).  -q
is ineffective.  bad initializer
>How-To-Repeat:
invoke parameterless dhclient.  output from the program is as if -q
was invoked
	
>Fix:
fix initialization so the -q option is once again the option and
verbose the default
	

*** src/contrib/isc-dhcp/client/dhclient.c.orig	Mon Mar  5 05:09:32 2001
--- src/contrib/isc-dhcp/client/dhclient.c	Wed Feb  6 17:54:22 2002
***************
*** 109,115 ****
  	struct servent *ent;
  	struct interface_info *ip;
  	int seed;
! 	int quiet = 1;
  	char *s;
  
  	s = strrchr (argv [0], '/');
--- 109,115 ----
  	struct servent *ent;
  	struct interface_info *ip;
  	int seed;
! 	int quiet = 0;
  	char *s;
  
  	s = strrchr (argv [0], '/');

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->obrien 
Responsible-Changed-By: cjc 
Responsible-Changed-When: Wed Feb 6 17:15:52 PST 2002 
Responsible-Changed-Why:  
Over to the person who introduced the change/bug: 

revision 1.6 
date: 1999/04/02 17:19:19;  author: obrien;  state: Exp;  lines: +1 -1 
Be quiet by default. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=34676 

From: "Crist J. Clark" <cjc@FreeBSD.ORG>
To: Howard Goldstein <hg@penny.n2wx.ampr.org>
Cc: FreeBSD-gnats-submit@FreeBSD.ORG, hg@cally.queue.to
Subject: Re: bin/34676: dhclient always in -q quiet mode (PATCH ENCLOSED)
Date: Wed, 6 Feb 2002 17:22:47 -0800

 On Wed, Feb 06, 2002 at 11:03:38PM -0000, Howard Goldstein wrote:
 [snip]
 
 > >Description:
 > 	
 > dhclient acts like it's permanently in quiet mode (-q option).  -q
 > is ineffective.  bad initializer
 
 Although this is somewhat bad form, I don't know if we really lose
 anything. All non-quiet mode does is spit out some copyright info and
 other stuff, nothing really useful.
 
 But I think at least the documentation should be fixed to reflect the
 localization.
 -- 
 Crist J. Clark                     |     cjclark@alum.mit.edu
                                    |     cjclark@jhu.edu
 http://people.freebsd.org/~cjc/    |     cjc@freebsd.org

From: Howard@penny.queue.to, Goldstein <hg@n2wx.ampr.org
To: "Crist J. Clark" <cjc@FreeBSD.ORG>
Cc: FreeBSD-gnats-submit@FreeBSD.ORG
Subject: Re: bin/34676: dhclient always in -q quiet mode (PATCH ENCLOSED)
Date: Wed, 6 Feb 2002 21:15:23 -0500 (EST)

 Crist J. Clark writes:
  > On Wed, Feb 06, 2002 at 11:03:38PM -0000, Howard Goldstein wrote:
  > [snip]
  > 
  > > >Description:
  > > 	
  > > dhclient acts like it's permanently in quiet mode (-q option).  -q
  > > is ineffective.  bad initializer
  > 
  > Although this is somewhat bad form, I don't know if we really lose
  > anything. 
 
 Unfortunately the program lacks support for a corresponding -v flag to
 restore the copyright and "other stuff", resulting in an unshakably
 silent program.
 
 
  > All non-quiet mode does is spit out some copyright info and
  > other stuff, nothing really useful.
 
 Agreed, provided the dhcp server isn't broken.

From: Murray Stokely <murray@FreeBSD.org>
To: freebsd-gnats-submit@FreeBSD.org
Cc:  
Subject: Re: bin/34676: dhclient always in -q quiet mode (PATCH ENCLOSED)
Date: Mon, 1 Apr 2002 02:10:50 -0800

   Here are two patches for this problem.  The first one just sets the
 default DHCP flags to -q in defaults/rc.conf.  This allows us to
 remove our local quiet-by-default hack from DHCP.  This will make
 future updates easier, since we will diverge less from the vendor
 source.  I find the verbose output useful when I type 'dhclient' from
 the command line, because the chances are that I only type that when I
 am debugging my network (i.e., if everything were working fine that
 would have been done at boot time).
 
   The second patch adds a -v option and updates the man page to
 reflect reality.
 
   I will commit this first patch in 3 days unless someone convinces me
 otherwise. ;)
 
 	- Murray
    
 Index: dhclient.8
 ===================================================================
 RCS file: /a/ncvs/src/contrib/isc-dhcp/client/dhclient.8,v
 retrieving revision 1.10
 diff -u -r1.10 dhclient.8
 --- dhclient.8	19 Feb 2002 12:00:47 -0000	1.10
 +++ dhclient.8	1 Apr 2002 09:58:45 -0000
 @@ -39,6 +39,9 @@
  .B -q
  ]
  [
 +.B -v
 +]
 +[
  .B -1
  ]
  [
 @@ -194,14 +197,16 @@
  under a debugger, or when running it out of inittab on System V
  systems.
  .PP
 -The client normally prints a startup message and displays the
 +The
 +.B -v
 +flag forces the client to print a startup message and display the
  protocol sequence to the standard error descriptor until it has
 -acquired an address, and then only logs messages using the
 +acquired an address, and then the client only logs messages using the
  .B syslog (3)
  facility.   The
  .B -q
  flag prevents any messages other than errors from being printed to the
 -standard error descriptor.
 +standard error descriptor (the default).
  .PP
  The client normally doesn't release the current lease as it is not
  required by the DHCP protocol.  Some cable ISPs require their clients
 Index: dhclient.c
 ===================================================================
 RCS file: /a/ncvs/src/contrib/isc-dhcp/client/dhclient.c,v
 retrieving revision 1.21
 diff -u -r1.21 dhclient.c
 --- dhclient.c	1 Apr 2002 08:02:18 -0000	1.21
 +++ dhclient.c	1 Apr 2002 09:55:50 -0000
 @@ -42,7 +42,7 @@
  #ifndef lint
  static char ocopyright[] =
  "$Id: dhclient.c,v 1.129.2.9 2002/02/20 07:16:31 mellon Exp $ Copyright (c) 1995-2001 Internet Software Consortium.  All rights reserved.\n"
 -"$FreeBSD: src/contrib/isc-dhcp/client/dhclient.c,v 1.21 2002/04/01 08:02:18 murray Exp $\n";
 +"$FreeBSD: src/contrib/isc-dhcp/client/dhclient.c,v 1.21 2002/04/01 06:54:31 murray Exp $\n";
  #endif /* not lint */
  
  #include "dhcpd.h"
 @@ -186,6 +186,8 @@
  		} else if (!strcmp (argv [i], "-q")) {
  			quiet = 1;
  			quiet_interface_discovery = 1;
 +		} else if (!strcmp (argv [i], "-v")) {
 +			quiet = 0;
  		} else if (!strcmp (argv [i], "-s")) {
  			if (++i == argc)
  				usage ();
Responsible-Changed-From-To: obrien->mbr 
Responsible-Changed-By: mbr 
Responsible-Changed-When: Mon Feb 10 02:04:27 PST 2003 
Responsible-Changed-Why:  
Take this PR. 

Add missing part from PR 37434 which was a dublicate of 
this PR here. 

--- /usr/src/contrib/isc-dhcp/client/dhclient.c	Mon Mar  5 02:09:32 2001 
+++ dhclient.c	Mon Apr  1 14:53:35 2002 
@@ -156,6 +156,8 @@ 
} else if (!strcmp (argv [i], "-q")) { 
quiet = 1; 
quiet_interface_discovery = 1; 
+		} else if (!strcmp (argv [i], "-l")) { 
+			quiet = 0; 
} else if (!strcmp (argv [i], "-1")) { 
onetry = 1; 
} else if (argv [i][0] == '-') { 
@@ -302,7 +304,7 @@ 
note (""); 

warn ("Usage: %s [-D] [-d] [-p <port>] [-cf conf-file]", appname); 
-	error ("       [-lf lease-file] [-pf pidfile] [-q] [-1] [interface]"); 
+	error ("       [-lf lease-file] [-pf pidfile] [-q | -l] [-1] [interface]"); 
} 


http://www.freebsd.org/cgi/query-pr.cgi?pr=34676 
State-Changed-From-To: open->closed 
State-Changed-By: mbr 
State-Changed-When: Sat Jun 26 10:57:30 GMT 2004 
State-Changed-Why:  
Fixed a long time ago. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=34676 
>Unformatted:
