>
> the search-string ist empty, on a redhat 6.2 it's working fine
> whats the problem???
I am experiencing the same problems with dhcpd and PCMCIA. When ever I
reinsert the NIC the search-order disappears. I believe the changes are
being made in ifup-post, but don't know enough about shell scripting to know
what is going on. I know this is asking a great deal, but could someone try
to explain what the following does:
# replace only the first two nameserver lines; cannot count on awk
# and do not know if sed is capable of this...
current_replacement="$DNS1"
next_replacement="$DNS2"
search=
(cat /etc/resolv.conf ; echo EOF ; echo EOF) | while read answer ; do
case $answer in
nameserver*|EOF)
if [ -n "$current_replacement" ] ; then
echo "nameserver $current_replacement" >> $tr
if [ -n "$next_replacement" ] ; then
current_replacement="$next_replacement"
next_replacement=
else
current_replacement=
fi
else
if [ "$answer" != EOF ] ; then
echo "$answer" >> $tr
fi
fi
;;
domain*|search*)
if [ -n "$DOMAIN" ]; then
echo "$answer" | while read key value ; do
search="$search $value"
done
else
echo "$answer" >> $tr
fi
;;
*)
echo "$answer" >> $tr
;;
esac
if [ -n "$DOMAIN" ]; then
echo "search $DOMAIN $search" >> $tr
fi
done
_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list