Bug 210524 - "dhclient --help" sends its output to syslog.
"dhclient --help" sends its output to syslog.
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: dhcp (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: David Cantrell
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-10-12 14:31 EDT by Peter Jones
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-10-13 14:52:11 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Peter Jones 2006-10-12 14:31:32 EDT
Description of problem:
"dhclient --help" sends its output to syslog.

Version-Release number of selected component (if applicable):
3.04-21.fc6

How reproducible:
3.14

Steps to Reproduce:
1. dhclient --help
  
Actual results:
no output to stdout or stderr, option summary and readme crap in syslog

Expected results:
option summary on standard output.

Additional info:
*sigh*.
Comment 1 David Cantrell 2006-10-13 13:50:57 EDT
Well, I found it.  Changed it all to printf()'s and then the behavior of
dhclient changed.  What was happening is the usage() function calls log_info(),
log_error(), and log_fatal() in the omapi library, which handles logging the
error messages (if an instance of dhclient is found to be running already) or
printing messages to stderr if it isn't running already.

I changed it to printfs and then had to go find all the calls for usage() and
put a return EXIT_FAILURE after displaying the usage screen, because you don't
want it to display the help screen and then grab a lease anyway.

What the hell are the ISC people smoking?

Also, their option parsing code for dhclient is written by hand.  They don't use
getopt().  I'm going to fix that.  Seriously, what the crap?
Comment 2 David Cantrell 2006-10-13 14:52:11 EDT
Fixed in rawhide.

Note You need to log in before you can comment on or make changes to this bug.