diff --git a/hyper-v.changes b/hyper-v.changes index 2e66669..1b4665e 100644 --- a/hyper-v.changes +++ b/hyper-v.changes @@ -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] diff --git a/hyper-v.tools.hv.hv_set_ifconfig.sh b/hyper-v.tools.hv.hv_set_ifconfig.sh index 46ef9c2..15123d1 100644 --- a/hyper-v.tools.hv.hv_set_ifconfig.sh +++ b/hyper-v.tools.hv.hv_set_ifconfig.sh @@ -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