Description of Problem: Upon execution, /etc/sysconfig/network-scripts/ifup-post will write a "search" line in resolv.conf (if DOMAIN is defined in a ifcfg file, e.g. ifcfg-eth0) for every line it will find in an existing resolv.conf file, plus 2 more times at the end. 3 lines are misplaced in this file: --- ifup-post.old Thu Mar 28 01:06:17 2002 +++ ifup-post.fixed Thu Mar 28 01:05:10 2002 @@ -62,10 +62,10 @@ echo "$answer" >> $tr ;; esac - if [ -n "$DOMAIN" ]; then - echo "search $DOMAIN $search" >> $tr - fi done + if [ -n "$DOMAIN" ]; then + echo "search $DOMAIN $search" >> $tr + fi # backup resolv.conf cp -af /etc/resolv.conf /etc/resolv.conf.save ------ The if statement above checks if DOMAIN is null, If not, it writes a "search" line to the temporary resolv.conf it is compiling. The search line should be perhaps a "domain" line (considering the DOMAIN variable), but anyway that's not such a big issue. Since this if statement is placed within the while loop, it is executed for every line that is read from the existing /etc/resolv.conf, plus two more times at the end (because EOF is echoed twice): <line 35> (cat /etc/resolv.conf ; echo EOF ; echo EOF) | while read answer ; do ... if [ -n "$DOMAIN" ]; then echo "search $DOMAIN $search" >> $tr fi done As shown above, it should be placed after the end of the loop. That will fix this tiny little problem :) Version-Release number of selected component (if applicable): initscripts-6.43-1
Closing bugs on older, no longer supported, releases. Apologies for any lack of response. If this persists on a current release, such as Fedora Core 4, please open a new bug.