Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 760093 - net-misc/netifrc-0.7.1-r1: /lib/netifrc/net/dhcpcd.sh: line 94: dhcpcd: command not found
Summary: net-misc/netifrc-0.7.1-r1: /lib/netifrc/net/dhcpcd.sh: line 94: dhcpcd: comma...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: netifrc (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: netifrc Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-12-15 19:11 UTC by Daniel M. Weeks
Modified: 2021-01-22 16:06 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel M. Weeks 2020-12-15 19:11:00 UTC
Due to the PID check add in dd5a41de524cfdebe47425e70513f95f9937e406, if dhcpcd is not installed but the module is not explicitly disabled, shutting down interfaces will print the following unnecessarily:

/lib/netifrc/net/dhcpcd.sh: line 94: dhcpcd: command not found

dhcpcd_stop() should be silent if dhcpcd is not installed.

Workaround: Disable dhcpcd if it not in use, ex:
modules="!dhcpcd"

Reproducible: Always
Comment 1 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2020-12-15 19:47:00 UTC
Does this commit fix it for you?

https://github.com/Polynomial-C/netifrc/commit/c0a768ae6573b6eea4ff5252df19cae4e9113c22
Comment 2 Brian Evans (RETIRED) gentoo-dev 2020-12-15 19:54:02 UTC
I believe this patch is what may fix it (since dhcpcd is now called in stop too):

--- a/net/dhcpcd.sh  2020-09-08 15:34:41.870917891 -0400
+++ b/net/dhcpcd.sh  2020-12-15 14:51:27.148297703 -0500
@@ -5,7 +5,7 @@
 dhcpcd_depend()
 {
        after interface
-       program start dhcpcd
+       program dhcpcd
        provide dhcp

        # We prefer dhcpcd over these
Comment 3 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2020-12-15 20:04:25 UTC
(In reply to Brian Evans from comment #2)
> I believe this patch is what may fix it (since dhcpcd is now called in stop
> too):
> 
> --- a/net/dhcpcd.sh  2020-09-08 15:34:41.870917891 -0400
> +++ b/net/dhcpcd.sh  2020-12-15 14:51:27.148297703 -0500
> @@ -5,7 +5,7 @@
>  dhcpcd_depend()
>  {
>         after interface
> -       program start dhcpcd
> +       program dhcpcd
>         provide dhcp
> 
>         # We prefer dhcpcd over these

Oh right. Haven't looked at depend at all. That looks like it's a much cleaner fix than mine.
Comment 4 Larry the Git Cow gentoo-dev 2020-12-15 20:11:13 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/netifrc.git/commit/?id=ee7316e32ecd90384f05f77ddb29abbdf97fa6a2

commit ee7316e32ecd90384f05f77ddb29abbdf97fa6a2
Author:     Brian Evans <grknight@gentoo.org>
AuthorDate: 2020-12-15 19:39:21 +0000
Commit:     Lars Wendler <polynomial-c@gentoo.org>
CommitDate: 2020-12-15 20:10:51 +0000

    net/dhcpcd.sh: Don't run dhcpcd on stop if it's not installed
    
    Bug: https://bugs.gentoo.org/760093
    Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>

 net/dhcpcd.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Comment 5 Another Mortal 2020-12-27 20:23:33 UTC
> Workaround: Disable dhcpcd if it not in use, ex:
> modules="!dhcpcd"

That workaround doesn't seem to work for me.
In fact, it would seem that I cannot disable **any** modules.
See https://bugs.gentoo.org/761987

On the other hand, removing `start
Comment 6 Another Mortal 2020-12-27 20:24:52 UTC
On the other hand, removing `start` in `dhcpcd_depend` *does* work.
Comment 7 Brian Evans (RETIRED) gentoo-dev 2020-12-27 20:56:19 UTC
(In reply to Another Mortal from comment #5)
> > Workaround: Disable dhcpcd if it not in use, ex:
> > modules="!dhcpcd"
> 
> That workaround doesn't seem to work for me.
> In fact, it would seem that I cannot disable **any** modules.
> See https://bugs.gentoo.org/761987
> 
> On the other hand, removing `start

You should not mix dhcpcd's runscript with another networking system like netifrc.  This script activates dhcpcd's manager mode for all devices (by default) and is meant to manage all interfaces with dhcp that appear.

If you want to use netifrc, do so for all interfaces and not this script.
Comment 8 Larry the Git Cow gentoo-dev 2021-01-05 15:20:30 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1e113ea4ee9aefeda5879557ce11af9457433841

commit 1e113ea4ee9aefeda5879557ce11af9457433841
Author:     Lars Wendler <polynomial-c@gentoo.org>
AuthorDate: 2021-01-05 15:12:55 +0000
Commit:     Lars Wendler <polynomial-c@gentoo.org>
CommitDate: 2021-01-05 15:20:27 +0000

    net-misc/netifrc: Revbump to fix a couple of outstanding issues
    
    - Don't run dhcpcd on interface stop if it is not installed
    - Removed support for very old dhcpcd versions (1.x - 3.x)
    - ppp-2.4.9 renamed "rp-pppoe" plugin to "pppoe" (we now support both)
    
    Bug: https://bugs.gentoo.org/760093
    Package-Manager: Portage-3.0.12, Repoman-3.0.2
    Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>

 net-misc/netifrc/Manifest                |  1 +
 net-misc/netifrc/netifrc-0.7.1-r2.ebuild | 73 ++++++++++++++++++++++++++++++++
 2 files changed, 74 insertions(+)