Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 599342 - >=0.2.2, noise from modules to stdout: net/dhcpcd.sh runs without the -q option and _gen_module_list() prints the 'need' directives in modules
Summary: >=0.2.2, noise from modules to stdout: net/dhcpcd.sh runs without the -q opti...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: netifrc (show other bugs)
Hardware: All Linux
: Normal trivial (vote)
Assignee: netifrc Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-11-09 20:35 UTC by Ole Johan Væringstad
Modified: 2016-11-09 20:38 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Adds the -q option to dhcpcd (quiet-dhcpcd.patch,324 bytes, patch)
2016-11-09 20:36 UTC, Ole Johan Væringstad
Details | Diff
Patch to add sed and epatch line to all ebuilds >=0.2.2 <9999 (quiet-dhcpcd.patch,324 bytes, patch)
2016-11-09 20:38 UTC, Ole Johan Væringstad
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ole Johan Væringstad 2016-11-09 20:35:08 UTC
1. During boot, dhcpcd will dump what it's doing amid all the clean openrc reporting. It's only cosmetic, but it's been an eyesore for a while for me, so I thought I'd look into it. Turns out there's no -q option provided in the net/dhcpcd.sh module, which I'm assuming should be the case, since 1) the init.d/dhcpcd script has this, 2) the net/dhclient.sh module has it, and 3) it's ugly ;)

2. As I was fiddling my way through net.lo trying to find what was doing what while starting and stopping net.eth0, I noticed sometimes 'need firewalld' and 'need dbus' would get printed in addition to the openrc output. This is from ${MODULE}_depend() in net/firewall.sh and net/wpa_supplicant.sh (the only modules with need, atleast in 0.2.2), it gets printed by 'eval ${MODULE}_depend' in _gen_module_list() in net.lo.

Reproducible: Always

Steps to Reproduce:
1.1 set up some interface to use dhcp. my conf.d/net looks like this:
    config_eth0="dhcp"
 
 .2 /etc/init.d/net.eth0 start

2.1 following from above, delete /run/openrc/nettree
 .2 /etc/init.d/net.eth0 stop

Actual Results:  
1:
 * Bringing up interface eth0
 *   dhcp ...
 *     Running dhcpcd ...
eth0: waiting for carrier
eth0: carrier aquired
eth0: adding address blablabla
.... you get the point
.... 9 more lines
 *     received address 192.168.2.7/24

2:
 * Caching service dependencies ...
 * Bringing down interface eth0
 *   Caching network module dependencies
need firewalld
need dbus
 *   Stopping dhcpcd on eth0

Expected Results:  
1:
 * Bringing up interface eth0
 *   dhcp ...
 *     Running dhcpcd ...
 *     received address 192.168.2.7/24

2:
 * Caching service dependencies ...
 * Bringing down interface eth0
 *   Caching network module dependencies
 *   Stopping dhcpcd on eth0

I've included a mighty patch to insert two whole characters in net/dhcpcd.sh

Since I'm assuming you guys also maintain the ebuilds, I've also included a patch for the changes I made after I copied netifrc into my private overlay: epatching the previous patch and sed'ing eval ${MODULE}_depend to /dev/null
Comment 1 Ole Johan Væringstad 2016-11-09 20:36:19 UTC
Created attachment 452830 [details, diff]
Adds the -q option to dhcpcd
Comment 2 Ole Johan Væringstad 2016-11-09 20:38:03 UTC
Created attachment 452832 [details, diff]
Patch to add sed and epatch line to all ebuilds >=0.2.2 <9999