Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 500942

Summary: net-misc/netifrc has erratic behavior when /bin/sh points to mksh
Product: Gentoo Hosted Projects Reporter: Lars Wendler (Polynomial-C) (RETIRED) <polynomial-c>
Component: netifrcAssignee: netifrc Team <netifrc>
Status: RESOLVED FIXED    
Severity: normal CC: keaneyw
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 526268    
Attachments: mksh_netifrc_problem.txt

Description Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2014-02-11 07:01:43 UTC
breakmygentoo:~ # ln -sfnv mksh /bin/sh
‘/bin/sh’ -> ‘mksh’
breakmygentoo:~ # /etc/init.d/net.eth0 restart
 * Bringing down interface eth0
 *   Stopping dhcpcd on eth0 ...                                          [ ok ]
 * Bringing up interface eth0
 *   Starting ifplugd on eth0 ...
 *   start-stop-daemon: /usr/sbin/ifplugd does not exist                  [ !! ]
 * WARNING: net.eth0 has started, but is inactive
breakmygentoo:~ # ln -sfnv dash /bin/sh
‘/bin/sh’ -> ‘dash’
breakmygentoo:~ # /etc/init.d/net.eth0 restart
 * Bringing down interface eth0
 * Bringing up interface eth0
 *   dhcpcd ...
 *     Running dhcpcd ...                                                 [ ok ]
 *     received address 192.168.1.88/24                                   [ ok ]
breakmygentoo:~ # qlist -CIve ifplugd
breakmygentoo:~ # grep -v "^\([[:space:]]*#\|$\)" /etc/conf.d/net
modules="iproute2"
config_eth0="dhcpcd"
dhcpcd_eth0="-q -t 20"
breakmygentoo:~ #

Neither ifplugd nor netplugd are installed but with mksh netifrc tries to use them anyway.
Comment 1 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2014-10-03 22:23:12 UTC
Created attachment 386012 [details]
mksh_netifrc_problem.txt

Output of "mksh -x" when running the net.eth0 init script.
Comment 2 mirabilos 2014-10-10 21:59:05 UTC
CcxCZ asked me in IRC about it. I found the bug in Gentoo.

Fix: https://github.com/gentoo/netifrc/pull/1
Comment 3 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2014-10-11 21:21:23 UTC
Committed to Git, not released yet
Comment 4 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2015-12-29 08:50:33 UTC
Fixed in netifrc-0.3.1