Hello, since I have installed netifrc 0.5.1 it tells me "need dbus" at starting the loopback. Until now this does not result in "real usage errors". It looks like the following: *INIT: Entering runlevel: 3 . . . *starting dbus *starting consolekit . . . *Bridging up interface lo * Caching network module dependencies need dbus * 127.0.0.1/8 * Adding routes * 127.0.0.0/8 via 127.0.0.1 . . . If I delete the loopback from runlevel default the first network-card which starts produces the "need dbus" error. The problem was also mentioned in the gentooforum: https://forums.gentoo.org/viewtopic-t-1056118.html?sid=612a4fb8b25b7d0ef5eb6e9c71679d83 Best regards
Can you still reproduce this on netifrc-0.6.1?
Thanks for your answer, unfortunately I can still reproduce it.
Unfortunately the error is still present, but is has changed a little bit. In netifrc-0.5.1 only the first network device starting -- normally lo -- produced the error. In netifrc-0.7.1 all network devices starting produce the error. Best Regards
The error seems to originate from wpa_supplicat.sh provided by netifrc, with XTRACE one can see + eval wpa_supplicant_depend ++ wpa_supplicant_depend ++ wpas=/usr/sbin/wpa_supplicant ++ '[' -x /usr/sbin/wpa_supplicant ']' ++ '[' -x /usr/sbin/wpa_supplicant ']' ++ program start /usr/sbin/wpa_supplicant ++ '[' start = start ']' ++ local s=start ++ shift ++ eval 'wpa_supplicant_program_start="${wpa_supplicant_program_start}${wpa_supplicant_program_start:+ }/usr/sbin/wpa_supplicant"' +++ wpa_supplicant_program_start=/usr/sbin/wpa_supplicant ++ /usr/sbin/wpa_supplicant -h ++ grep DBus -sq ++ '[' 0 -eq 0 ']' ++ need dbus ++ '[' -n dbus ']' ++ echo 'need dbus' need dbus This is output of running wpa_supplicant_depend() { wpas=/usr/sbin/wpa_supplicant [ -x ${wpas} ] || wpas=/sbin/wpa_supplicant if [ -x ${wpas} ]; then program start ${wpas} # bug 345281: if wpa_supplicant is built w/ USE=dbus, we need to start # dbus before we can start wpa_supplicant. ${wpas} -h |grep DBus -sq [ $? -eq 0 ] && need dbus fi after macnet plug before interface provide wireless # Prefer us over iwconfig after iwconfig } For whatever reason, the functions like after, before and provided seems to execute other function that the need that is defined in /lib/rc/sh/openrc-run.sh as need() { [ -n "$*" ] && echo "need $*" } Steps to reproduce; - enable rc.log - add 'set -x' to /etc/init.d/net.lo - reboot - see /var/log/rc.log
After looking more into it, it seems the problem is that the function 'need' does not work, or does not interfaces with openrc-run. Instead of being passed to openrc, it prints to screen.
(In reply to Piotr Karbowski from comment #5) > After looking more into it, it seems the problem is that the function 'need' > does not work, or does not interfaces with openrc-run. Instead of being > passed to openrc, it prints to screen. Well, it gets caught by the need() function of openrc's /lib/rc/sh/openrc-run.sh helper which does a simple echon on every input to that function: # grep -FA2 'need()' /lib/rc/sh/openrc-run.sh need() { [ -n "$*" ] && echo "need $*" } This has worked back when netifrc was part of openrc. But nowadays it's simply dead code and should be removed. Thanks Piotr for your thorough analysis and your patience with me ;)
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/netifrc.git/commit/?id=60bd853443f8e01c4309aeb2f3198f959c62cfdf commit 60bd853443f8e01c4309aeb2f3198f959c62cfdf Author: Lars Wendler <polynomial-c@gentoo.org> AuthorDate: 2021-01-18 14:21:31 +0000 Commit: Lars Wendler <polynomial-c@gentoo.org> CommitDate: 2021-01-18 14:26:11 +0000 net/wpa_supplicant.sh: Removed non-working "need dbus" call This is a remnant from when netifrc was part of openrc. After netifrc became it's own standalone project, the call "need dbus" got caught by the need() function from openrc's sh/openrc-run.sh script which does a simple echo on every input it receives. Bug: https://bugs.gentoo.org/622730 Signed-off-by: Lars Wendler <polynomial-c@gentoo.org> net/wpa_supplicant.sh | 8 -------- 1 file changed, 8 deletions(-)
Closing, as the above mentioned patch was incorporated by netifrc-0.7.3.