Broken substitution
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
[email protected]
Author: David Dillow <dave-i1Mk8JYDVaaSihdK6806/[email protected]> 2009-07-23 23:16:31
Committer: Warren Togami <[email protected]> 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 [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 11 lines · Warren Togami
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 [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 1248903464.19166.43.camel-FqX9LgGZnHWDB2HL1qBt2PIbXMQ5te18@public.gmane.org
Quoted 13 lines · David Dillow
Quoted 11 lines · Warren Togami
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.
Quoted 7 lines
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 [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 16 lines · Warren Togami
Quoted 15 lines · David Dillow
Quoted 11 lines · Warren Togami
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?
Quoted 8 lines
Quoted 5 lines
# 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 [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 1248908439.8777.9.camel-1q1vX8mYZiGLUyTwlgNVppKKF0rrzTr+@public.gmane.org
Quoted 11 lines · David Dillow
Quoted 6 lines
Quoted 6 lines · Warren Togami
Quoted 5 lines
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 [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html