Bug 643474 - [PATCH] Output determined IP address if available
Summary: [PATCH] Output determined IP address if available
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: initscripts
Version: 19
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Lukáš Nykrýn
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-10-15 17:34 UTC by Ville Skyttä
Modified: 2015-02-17 15:41 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-02-17 13:25:45 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Output determined IP address if available (902 bytes, patch)
2010-10-15 17:34 UTC, Ville Skyttä
no flags Details | Diff
Patch for dhcp package (2.69 KB, patch)
2011-03-01 16:39 UTC, Ville Skyttä
no flags Details | Diff
Revised patch for initscripts (1.84 KB, patch)
2011-03-01 16:41 UTC, Ville Skyttä
no flags Details | Diff

Description Ville Skyttä 2010-10-15 17:34:12 UTC
Created attachment 453764 [details]
Output determined IP address if available

Outputting the determined IP address would be more useful than "Determining IP information for eth0... done." from ifup-eth, patch attached.

Comment 1 Bill Nottingham 2011-02-25 21:34:05 UTC
I can see why this would be useful, but it's also a bit ugly, especially when dhclient-script has the address already and can print it out.

Comment 2 Ville Skyttä 2011-02-28 23:07:20 UTC
Agreed, it is somewhat ugly.  Adding a simple /etc/dhcp/dhclient-up-hooks script like "echo -n $new_ip_address" would do the trick adequately (some fine tuning of the initscripts output would be harder than worth it but... meh) but I'm not sure if it would interfere with some dhclient use cases outside of initscripts.

Cc'ing dhcp maintainer, how about something like this instead:

ifup-eth invokes dhclient with "-e ECHO_IP=y".

dhclient installs this as /etc/dhcp/dhclient-up-hooks (negated logic with || used in order to avoid non-zero exit status):

#!/bin/sh
[ "$ECHO_IP" != "y" ] || echo -n $new_ip_address

Comment 3 Jiri Popelka 2011-03-01 11:11:06 UTC
Ok, I have no problem with adding 

[ "$ECHO_IP" != "y" ] || echo -n $new_ip_address

to dhclient-script.

Comment 4 Ville Skyttä 2011-03-01 16:39:45 UTC
Created attachment 481681 [details]
Patch for dhcp package

Ok, here's the patch for dhcp.  I think using /etc/dhcp/dhclient-up-hooks is better than doing this in dhclient-script in case people want to disable the echo for some reason.  The shebang is there just because the script (oddly) needs to be executable (it's just sourced, not executed).  The whitespace in the echo is for nicer output when it goes between ifup-eth's output.

Comment 5 Ville Skyttä 2011-03-01 16:41:01 UTC
Created attachment 481682 [details]
Revised patch for initscripts

Here's the revised initscripts patch.  Not tested with IPv6 as I don't have it easily available.

Comment 6 Fedora End Of Life 2013-04-03 18:52:13 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 19 development cycle.
Changing version to '19'.

(As we did not run this process for some time, it could affect also pre-Fedora 19 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 19 End Of Life. Thank you.)

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora19

Comment 7 Fedora Admin XMLRPC Client 2013-09-04 14:49:14 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 8 Fedora End Of Life 2015-01-09 16:23:19 UTC
This message is a notice that Fedora 19 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 19. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained. Approximately 4 (four) weeks from now this bug will
be closed as EOL if it remains open with a Fedora 'version' of '19'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 19 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 9 Fedora End Of Life 2015-02-17 13:25:45 UTC
Fedora 19 changed to end-of-life (EOL) status on 2015-01-06. Fedora 19 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 10 Jiri Popelka 2015-02-17 15:41:39 UTC
I've added sample dhclient-enter-hooks into doc/dhclient/ which among others also writes out the $new_ip_address
http://pkgs.fedoraproject.org/cgit/dhcp.git/commit/?id=cbf79dcf165f609c302fda9f97f9a0714c76128f


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