RE: [PMX:#] Re: nonstandard options missing from --dumplease in 6.10.1
neal.p.murphy
Sun Oct 22 17:10:55 2017
I don't recall any shell allowing a - in var names. But then, I could be thinking C.
-------- Original message --------From: Roy Marples <roy@xxxxxxxxxxxx> Date: 10/22/17 5:19 AM (GMT-05:00) To: Mike McCabe <mike@xxxxxxxx> Cc: JED <John@xxxxxxxxxxxxx>, dhcpcd-discuss@xxxxxxxxxxxx Subject: [PMX:#] Re: [dhcpcd-discuss] nonstandard options missing from --dumplease
in 6.10.1
I tested with bash and dash, the two shells Debian ships with and neither now work with a - in the variable name when exported using the env command. So they could rightly argue it's a bug fix and not a regression.
If you wanted to keep using - then use something other than a shell to extract the data.
I wouldn't bother reporting this.
Roy
On 22 Oct 2017 00:57, Mike McCabe <mike@xxxxxxxx> wrote:
I've just verified this in our environment.
Thank you! You've saved is a bunch of trouble!
Do you think this is worth bringing up with Debian as a potential regression? Obviously it's not specific to dhcpcd, but to how it's used...
Mike
On Sat, Oct 21, 2017 at 7:18 AM, Roy Marples <roy@xxxxxxxxxxxx> wrote:
Hi Mike
On 19/10/2017 23:45, Mike McCabe wrote:
Thanks for testing! I'm still able to reproduce the issue, stock raspbian jessie lite works vs. raspbian stretch lite doesn't... in each case with option vium-env lines added to dhcpcd.conf
$ dhcpcd -V4 | grep vium
239 vium-env string
$ dhcpcd -U4 eth0 | grep vium
domain_name='vium.com <http://vium.com>'
< no vium-env >
I've been so blind!
It's not a dhcpcd bug per se, but the shell you're using.
dhcpcd just sets env vars as given, however, it makes no attempt to sanitize them instead leaving it up to whatever the hook uses.
In this case it's /bin/sh.
I'm guessing there has been an upgrade there which stops - being used in environment vars. You aren't allowed - in shell variables, and you use shell variables to extract env vars.
Try changing from vium-env to vium_env and you'll find this working should be working.
I had to test this on a Debian derivative box to actually track this one down.
Roy
Archive administrator: postmaster@marples.name