Harald Hoyer 2016-06-07 11:08:12 +02:00
commit f3355208f9
3 changed files with 18 additions and 18 deletions

View File

@ -321,16 +321,16 @@ fi
ip=$(getarg ip)

if [ -z "$NO_AUTO_DHCP" ] && [ -z "$ip" ]; then
for s in $(getargs nameserver); do
[ -n "$s" ] || continue
echo nameserver $s >> /tmp/net.$netif.resolv.conf
done

if [ "$netroot" = "dhcp6" ]; then
do_dhcp -6
else
do_dhcp -4
fi

for s in $(getargs nameserver); do
[ -n "$s" ] || continue
echo nameserver $s >> /tmp/net.$netif.resolv.conf
done
fi


@ -355,17 +355,6 @@ for p in $(getargs ip=); do
# If this option isn't directed at our interface, skip it
[ -n "$dev" ] && [ "$dev" != "$netif" ] && continue

# setup nameserver
for s in "$dns1" "$dns2" $(getargs nameserver); do
[ -n "$s" ] || continue
echo nameserver $s >> /tmp/net.$netif.resolv.conf
done

# Store config for later use
for i in ip srv gw mask hostname macaddr mtu dns1 dns2; do
eval '[ "$'$i'" ] && echo '$i'="$'$i'"'
done > /tmp/net.$netif.override

for autoopt in $(str_replace "$autoconf" "," " "); do
case $autoopt in
dhcp|on|any)
@ -381,6 +370,17 @@ for p in $(getargs ip=); do
done
ret=$?

# setup nameserver
for s in "$dns1" "$dns2" $(getargs nameserver); do
[ -n "$s" ] || continue
echo nameserver $s >> /tmp/net.$netif.resolv.conf
done

# Store config for later use
for i in ip srv gw mask hostname macaddr mtu dns1 dns2; do
eval '[ "$'$i'" ] && echo '$i'="$'$i'"'
done > /tmp/net.$netif.override

if [ $ret -eq 0 ]; then
> /tmp/net.${netif}.up


View File

@ -23,7 +23,7 @@ installkernel() {
# called by dracut
install() {
local _arch _i _dir
inst_multiple ip arping dhclient sed
inst_multiple ip arping dhclient sed awk
inst_multiple -o ping ping6
inst_multiple -o brctl
inst_multiple -o teamd teamdctl teamnl

View File

@ -120,7 +120,7 @@ setup_net() {
[ -e /tmp/dhclient.$netif.dhcpopts ] && . /tmp/dhclient.$netif.dhcpopts
# set up resolv.conf
[ -e /tmp/net.$netif.resolv.conf ] && \
cp -f /tmp/net.$netif.resolv.conf /etc/resolv.conf
awk '!array[$0]++' /tmp/net.$netif.resolv.conf > /etc/resolv.conf
[ -e /tmp/net.$netif.gw ] && . /tmp/net.$netif.gw

# add static route