Bug 85841
Summary: | ifup-post removes 'search' domains from /etc/resolv.conf | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Enrique Perez-Terron <enrio> |
Component: | initscripts | Assignee: | Bill Nottingham <notting> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Brock Organ <borgan> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | rawhide | CC: | enrio, rvokal |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2005-04-28 19:03:41 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Enrique Perez-Terron
2003-03-09 03:37:17 UTC
I suggest the following patch. The inner level of "echo | while read" is removed. The outer is kept, but the use of the variable is moved inside the subshell by adding a pair of parentheses, i.e. echo | (while read...done; echo $VARIALBE >> file) --- /etc/sysconfig/network-scripts/ifup-post 2003-03-09 04:09:09.000000000 +0100 +++ /usr/src/redhat/BUILD/initscripts-7.10/sysconfig/network-scripts/ifup-post 2003-02-20 18:14:53.000000000 +0100 @@ -34,7 +34,7 @@ current_replacement="$DNS1" next_replacement="$DNS2" search= - (cat /etc/resolv.conf ; echo EOF ; echo EOF) | (while read answer ; do + (cat /etc/resolv.conf ; echo EOF ; echo EOF) | while read answer ; do case $answer in nameserver*|EOF) if [ -n "$current_replacement" ] ; then @@ -53,7 +53,9 @@ ;; domain*|search*) if [ -n "$DOMAIN" ]; then - search=`set $answer; shift; echo "$search $*"` + echo "$answer" | while read key value ; do + search="$search $value" + done else echo "$answer" >> $tr fi @@ -65,7 +67,7 @@ done if [ -n "$DOMAIN" ]; then echo "search $DOMAIN $search" >> $tr - fi) + fi # backup resolv.conf cp -af /etc/resolv.conf /etc/resolv.conf.save This is fixed in current initscripts. |