mirror of
https://github.com/sheumann/hush.git
synced 2024-11-19 23:31:39 +00:00
examples/udhcp: do not rewrite resolv.conf if no DNS servers. Closes 6788
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
d74f8435ea
commit
2e66daca65
@ -22,10 +22,14 @@ then
|
|||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo -n > $RESOLV_CONF
|
# Only replace resolv.conf is we have at least one DNS server
|
||||||
[ -n "$domain" ] && echo domain $domain >> $RESOLV_CONF
|
if [ -n "$dns" ]
|
||||||
for i in $dns
|
then
|
||||||
do
|
echo -n > $RESOLV_CONF
|
||||||
echo adding dns $i
|
[ -n "$domain" ] && echo domain $domain >> $RESOLV_CONF
|
||||||
echo nameserver $i >> $RESOLV_CONF
|
for i in $dns
|
||||||
done
|
do
|
||||||
|
echo adding dns $i
|
||||||
|
echo nameserver $i >> $RESOLV_CONF
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
@ -22,10 +22,14 @@ then
|
|||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo -n > $RESOLV_CONF
|
# Only replace resolv.conf is we have at least one DNS server
|
||||||
[ -n "$domain" ] && echo domain $domain >> $RESOLV_CONF
|
if [ -n "$dns" ]
|
||||||
for i in $dns
|
then
|
||||||
do
|
echo -n > $RESOLV_CONF
|
||||||
echo adding dns $i
|
[ -n "$domain" ] && echo domain $domain >> $RESOLV_CONF
|
||||||
echo nameserver $i >> $RESOLV_CONF
|
for i in $dns
|
||||||
done
|
do
|
||||||
|
echo adding dns $i
|
||||||
|
echo nameserver $i >> $RESOLV_CONF
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user