more updates

- update hv_set_ifconfig further to work with our ifcfg [bnc#790469]

OBS-URL: https://build.opensuse.org/package/show/Virtualization/hyper-v?expand=0&rev=46
This commit is contained in:
Olaf Hering 2012-11-23 19:50:20 +00:00 committed by Git OBS Bridge
parent aff955d3ed
commit df04378625
2 changed files with 7 additions and 12 deletions

View File

@ -1,5 +1,5 @@
-------------------------------------------------------------------
Fri Nov 23 15:58:28 CET 2012 - ohering@suse.de
Fri Nov 23 20:49:31 CET 2012 - ohering@suse.de
- update hv_set_ifconfig further to work with our ifcfg [bnc#790469]

View File

@ -122,23 +122,17 @@ fi
for var in ${!IPV6ADDR*}
do
index=${var#IPV6ADDR}
pfx=
# find corresponding IPV6NETMASK variable
eval nm=\$IPV6NETMASK${index}
eval pfx=\$IPV6NETMASK${index}
# if specified, calculate prefix
if test -n "${nm}"
if test -z "${pfx}"
then
pfx=`mask2pfxlen "${nm}" 2>/dev/null`
pfx=128
fi
# construct actual value
eval val=\$IPV6ADDR${index}
# append prefix to value
if test -n "${pfx}"
then
val="${val}/${pfx}"
fi
# write config variable
echo "IPV6ADDR${index}='${val}'"
echo "IPADDR${index}='${val}/${pfx}'"
done
) >> "${t_ifcfg}"
@ -177,9 +171,10 @@ done
echo "$0: working on network interface ifcfg-${IF_NAME}"
cp -fb ${t_ifcfg} "/etc/sysconfig/network/ifcfg-${IF_NAME}"
cp -fb ${t_ifroute} "/etc/sysconfig/network/ifroute-${IF_NAME}"
if test -n "${_DNS_}" && test -w /etc/sysconfig/network/config
if test -w /etc/sysconfig/network/config
then
sed -i "s@^NETCONFIG_DNS_STATIC_SERVERS=.*@NETCONFIG_DNS_STATIC_SERVERS='$_DNS_'@" /etc/sysconfig/network/config
netconfig update -m dns
fi
ifdown "${IF_NAME}" -o hotplug
ifup "${IF_NAME}" -o hotplug