* Broken substitution
@ 2009-07-29 21:13 Warren Togami
[not found] ` <4A70BB67.7030803-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
0 siblings, 1 reply; 5+ messages in thread
From: Warren Togami @ 2009-07-29 21:13 UTC (permalink / raw)
To: initramfs
Upstream dhclient writes out \032 instead of a space if multiple search
domains are specified in dhcpd.conf. It has been this way for years.
Debian and Fedora have worked around this by doing the below bash
substitution. Upstream has rejected fixing this in dhclient for
different reasons.
The substitution below works on bash but not dash.
Dillow suggested this method that will work with bash and dash.
Unfortunately I now noticed that this seems to remove the space between
search domain entries.
Any suggestions of how we can fix this?
Warren Togami
wtogami-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org
Author: David Dillow <dave-i1Mk8JYDVaaSihdK6806/g@public.gmane.org> 2009-07-23 23:16:31
Committer: Warren Togami <wtogami-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> 2009-07-23 23:16:31
Parent: ef380e9de85db798e4994a981ef00a2857af9c79 (Turns out this is
really a misconfigured DHCP server, apply the same workaround as Debian
and upstream dhclient-script.)
Child: b03edf372f8eee9097311c64cdee431e45049dc0
(40network/parse-bridge: add bridge to $initrdargs)
Branches: master, remotes/origin/master
Follows: 0.6
Precedes:
dash compatible substitution
--------------------- modules.d/40network/dhclient-script
---------------------
index 142095d..1ef239a 100755
@@ -7,7 +7,7 @@ setup_interface() {
bcast=$new_broadcast_address
gw=${new_routers%%,*}
domain=$new_domain_name
- search="${new_domain_search//\\032/ }"
+ search=$(printf "$new_domain_search")
namesrv=$new_domain_name_servers
hostname=$new_host_name
--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Broken substitution
[not found] ` <4A70BB67.7030803-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
@ 2009-07-29 21:37 ` David Dillow
[not found] ` <1248903464.19166.43.camel-FqX9LgGZnHWDB2HL1qBt2PIbXMQ5te18@public.gmane.org>
0 siblings, 1 reply; 5+ messages in thread
From: David Dillow @ 2009-07-29 21:37 UTC (permalink / raw)
To: Warren Togami; +Cc: initramfs
On Wed, 2009-07-29 at 17:13 -0400, Warren Togami wrote:
> Upstream dhclient writes out \032 instead of a space if multiple search
> domains are specified in dhcpd.conf. It has been this way for years.
> Debian and Fedora have worked around this by doing the below bash
> substitution. Upstream has rejected fixing this in dhclient for
> different reasons.
>
> The substitution below works on bash but not dash.
>
> Dillow suggested this method that will work with bash and dash.
> Unfortunately I now noticed that this seems to remove the space between
> search domain entries.
What are you talking about?
# dash
$ t="1 2"
$ printf "$t"
1 2$
--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Broken substitution
[not found] ` <1248903464.19166.43.camel-FqX9LgGZnHWDB2HL1qBt2PIbXMQ5te18@public.gmane.org>
@ 2009-07-29 21:39 ` Warren Togami
[not found] ` <4A70C190.6050902-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
0 siblings, 1 reply; 5+ messages in thread
From: Warren Togami @ 2009-07-29 21:39 UTC (permalink / raw)
To: David Dillow; +Cc: initramfs
On 07/29/2009 05:37 PM, David Dillow wrote:
> On Wed, 2009-07-29 at 17:13 -0400, Warren Togami wrote:
>> Upstream dhclient writes out \032 instead of a space if multiple search
>> domains are specified in dhcpd.conf. It has been this way for years.
>> Debian and Fedora have worked around this by doing the below bash
>> substitution. Upstream has rejected fixing this in dhclient for
>> different reasons.
>>
>> The substitution below works on bash but not dash.
>>
>> Dillow suggested this method that will work with bash and dash.
>> Unfortunately I now noticed that this seems to remove the space between
>> search domain entries.
>
> What are you talking about?
>
> # dash
> $ t="1 2"
> $ printf "$t"
> 1 2$
>
It handles an actual space just fine. But not the broken \032 space
from dhclient.
Warren
--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Broken substitution
[not found] ` <4A70C190.6050902-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
@ 2009-07-29 23:00 ` David Dillow
[not found] ` <1248908439.8777.9.camel-1q1vX8mYZiGLUyTwlgNVppKKF0rrzTr+@public.gmane.org>
0 siblings, 1 reply; 5+ messages in thread
From: David Dillow @ 2009-07-29 23:00 UTC (permalink / raw)
To: Warren Togami; +Cc: initramfs
On Wed, 2009-07-29 at 17:39 -0400, Warren Togami wrote:
> On 07/29/2009 05:37 PM, David Dillow wrote:
> > On Wed, 2009-07-29 at 17:13 -0400, Warren Togami wrote:
> >> Upstream dhclient writes out \032 instead of a space if multiple search
> >> domains are specified in dhcpd.conf. It has been this way for years.
> >> Debian and Fedora have worked around this by doing the below bash
> >> substitution. Upstream has rejected fixing this in dhclient for
> >> different reasons.
> >>
> >> The substitution below works on bash but not dash.
> >>
> >> Dillow suggested this method that will work with bash and dash.
> >> Unfortunately I now noticed that this seems to remove the space between
> >> search domain entries.
> >
> > What are you talking about?
> >
> > # dash
> > $ t="1 2"
> > $ printf "$t"
> > 1 2$
> >
>
> It handles an actual space just fine. But not the broken \032 space
> from dhclient.
Ok, it looked link a space in the terminal, but when I went to copy it
into this mail to show that I still could not reproduce the problem, I
noticed the actual issue -- \032 is not a space, it is ctrl-Z (0x1a, or
SUB).
Can we get dhclient to fix this obvious bug, even if they won't fix the
real issue? We've tried to avoid working around tool bugs in the past,
and as I understand it, this is a combo dhclient bug and DHCP server
configuration bug, so is it really important to work around it?
There may be a way to build a loop to convert instances of \032 to
spaces, but it will be ugly.
Or perhaps printf and a few games with IFS.
--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Broken substitution
[not found] ` <1248908439.8777.9.camel-1q1vX8mYZiGLUyTwlgNVppKKF0rrzTr+@public.gmane.org>
@ 2009-07-30 1:57 ` David Dillow
0 siblings, 0 replies; 5+ messages in thread
From: David Dillow @ 2009-07-30 1:57 UTC (permalink / raw)
To: Warren Togami; +Cc: initramfs
On Wed, 2009-07-29 at 19:00 -0400, David Dillow wrote:
> > > On Wed, 2009-07-29 at 17:13 -0400, Warren Togami wrote:
> > >> Upstream dhclient writes out \032 instead of a space if multiple search
> > >> domains are specified in dhcpd.conf. It has been this way for years.
> > >> Debian and Fedora have worked around this by doing the below bash
> > >> substitution. Upstream has rejected fixing this in dhclient for
> > >> different reasons.
> Can we get dhclient to fix this obvious bug, even if they won't fix the
> real issue? We've tried to avoid working around tool bugs in the past,
> and as I understand it, this is a combo dhclient bug and DHCP server
> configuration bug, so is it really important to work around it?
Are you sure this bites with dhcpd.conf, and not just dhclient.conf? I
was trying to find a recent bug report on this to get more info, and
while I found a few [1-5], they all reference dhclient.conf. They are
also a bit old, so perhaps you know of something more recent.
Currently, we install our own dhclient.conf, so this shouldn't bite us
unless there is a server component as well. We may want to change that
at some point, which has its own hairy issues with respect to merging
the option lists...
[1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=492500
[2] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=461056
[3] https://bugs.launchpad.net/ubuntu/+source/dhcp3/+bug/275288
[4] https://bugzilla.redhat.com/show_bug.cgi?id=450042
[5] https://bugzilla.redhat.com/show_bug.cgi?id=458555
--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-07-30 1:57 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-29 21:13 Broken substitution Warren Togami
[not found] ` <4A70BB67.7030803-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2009-07-29 21:37 ` David Dillow
[not found] ` <1248903464.19166.43.camel-FqX9LgGZnHWDB2HL1qBt2PIbXMQ5te18@public.gmane.org>
2009-07-29 21:39 ` Warren Togami
[not found] ` <4A70C190.6050902-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2009-07-29 23:00 ` David Dillow
[not found] ` <1248908439.8777.9.camel-1q1vX8mYZiGLUyTwlgNVppKKF0rrzTr+@public.gmane.org>
2009-07-30 1:57 ` David Dillow
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.