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

Bug 714694

Summary: =net-misc/netifrc-0.7.1 with /bin/sh -> mksh: /lib/netifrc/net/iw.sh[731]: no closing quote
Product: Gentoo Hosted Projects Reporter: Lars Wendler (Polynomial-C) (RETIRED) <polynomial-c>
Component: netifrcAssignee: netifrc Team <netifrc>
Status: RESOLVED UPSTREAM    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2020-03-25 09:56:14 UTC
Each time netifrc is caching its network module list, the following message appears when mksh is being set as /bin/sh:

   *   Caching network module dependencies
  /lib/netifrc/net/iw.sh[731]: no closing quote

using dash or bash as /bin/sh does not trigger this message


Steps to reproduce:

1) emerge -1n app-shells/mksh
2) ln -sfnv mksh /bin/sh
3) rm /run/openrc/nettreelo
4) /etc/init.d/net.lo restart
Comment 1 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2020-03-25 22:13:05 UTC
netifrc targets POSIX and tests with dash.

here's the line that mksh does not parse correctly:
eval MAC_${APS}="\""$(echo "${x%(*}" | tr '[:lower:]' '[:upper:]' )"\""

specifically, mksh does not parse this expression correctly:
echo "${x%(*}"

Please file a bug to upstream mksh.

Alternate versions of that line will be accepted as well, feel free to test and commit