Hello community,
here is the log from the commit of package hyper-v.1955 for openSUSE:12.2:Update checked in at 2013-09-02 13:32:34
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:12.2:Update/hyper-v.1955 (Old)
and /work/SRC/openSUSE:12.2:Update/.hyper-v.1955.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "hyper-v.1955"
Changes:
--------
New Changes file:
--- /dev/null 2013-07-23 23:44:04.804033756 +0200
+++ /work/SRC/openSUSE:12.2:Update/.hyper-v.1955.new/hyper-v.changes 2013-09-02 13:32:36.000000000 +0200
@@ -0,0 +1,281 @@
+-------------------------------------------------------------------
+Mon Aug 12 16:56:08 CEST 2013 - ohering@suse.de
+
+- Skip restart_on_update with old hyper-v.rpms while old
+ kernel is running (bnc#770763)
+
+-------------------------------------------------------------------
+Wed Aug 7 19:04:35 CEST 2013 - ohering@suse.de
+
+- cache FQDN in kvp_daemon to avoid timeouts (bnc#828714)
+- use full nlmsghdr in netlink_send
+- correct payload size in netlink_send
+- use single send+recv buffer
+- log errors to syslog in kvp_set_ip_info
+- check return value of system in hv_kvp_daemon
+- in kvp_set_ip_info free mac_addr right after usage
+- check return value of daemon to fix compiler warning.
+
+-------------------------------------------------------------------
+Thu Aug 1 14:21:57 CEST 2013 - ohering@suse.de
+
+- Fix send/recv buffer allocation (bnc#828714)
+
+-------------------------------------------------------------------
+Wed Jul 24 10:18:34 CEST 2013 - ohering@suse.de
+
+- set BOOTPROTO=static if any IPADDR/IP6ADDR was passed to
+ hv_set_ifconfig and dhcp is disabled
+
+-------------------------------------------------------------------
+Mon Jul 15 16:16:06 CEST 2013 - ohering@suse.de
+
+- update hv_kvp_daemon (merge 0783d72fa from v3.9-rc1)
+ Fix how ifcfg-* file is created
+
+-------------------------------------------------------------------
+Mon Jul 15 15:24:00 CEST 2013 - ohering@suse.de
+
+- update hv_kvp_daemon (changes up to 3.11-rc1):
+ Improve error logging in KVP daemon.
+ Fix file descriptor leaks
+ Check retrun value of strchr call
+ Check return value of poll call
+ Check return value of setsockopt call
+ daemon should check type of received Netlink msg
+ daemon setsockopt should use options macros
+ daemon should subscribe only to CN_KVP_IDX group
+
+-------------------------------------------------------------------
+Mon Jul 15 12:04:05 CEST 2013 - ohering@suse.de
+
+- Fix a bug in IPV6 subnet enumeration (bnc#828714)
+
+-------------------------------------------------------------------
+Fri Mar 22 16:56:57 CET 2013 - ohering@suse.de
+
+- build hv_kvp_daemon with -D_GNU_SOURCE to get O_CLOEXEC
+
+-------------------------------------------------------------------
+Fri Mar 22 16:19:38 CET 2013 - ohering@suse.de
+
+- update hv_kvp_daemon
+ Use CLOEXEC when opening kvp_pool files
+ Fix permissions of created directory and files
+ Fix string types
+
+-------------------------------------------------------------------
+Tue Nov 27 11:19:32 CET 2012 - ohering@suse.de
+
+- update hv_set_ifconfig, use single index for static ipv4/ipv6 [bnc#790469]
+
+-------------------------------------------------------------------
+Sun Nov 25 17:50:40 CET 2012 - ohering@suse.de
+
+- update hv_set_ifconfig further to work with our ifcfg [bnc#790469]
+
+-------------------------------------------------------------------
+Thu Nov 22 18:14:12 CET 2012 - ohering@suse.de
+
+- update hv_get_dhcp_info to work with our ifcfg [bnc#790469]
+- remove cat usage from hv_get_dns_info
+- add quoting to hv_set_ifconfig to make it more robust
+
+-------------------------------------------------------------------
+Mon Nov 12 17:18:25 CET 2012 - ohering@suse.de
+
+- remove code to build kmp, it was not enabled because the
+ drivers are now in kernel since a long time. [bnc#676890]
+
+-------------------------------------------------------------------
+Thu Nov 8 14:30:05 CET 2012 - ohering@suse.de
+
+- Netlink source address validation allows DoS [bnc#791605, CVE-2012-5532]
+ bugfix for recvfrom check from bnc#761200
+
+-------------------------------------------------------------------
+Fri Oct 26 17:13:40 CEST 2012 - ohering@suse.de
+
+- update hv_set_ifconfig to work with our ifcfg
+
+-------------------------------------------------------------------
+Sat Oct 13 11:40:30 CEST 2012 - ohering@suse.de
+
+- update hv_kvp_daemon
+ Return the full kernel version
+ Don't return loopback addresses
+
+-------------------------------------------------------------------
+Thu Oct 4 15:14:05 CEST 2012 - ohering@suse.de
+
+- bump to version 4
+- update kv_kvp_daemon to 3.7-rc1 state [fate#314441]
+ support KVP IP Injection, helper scripts go to /usr/lib/hyper-v/bin:
+ hv_get_dhcp_info, hv_get_dns_info, hv_set_ifconfig
+- remove usage of absolute paths in runlevel script
+
+-------------------------------------------------------------------
+Tue Sep 4 14:55:38 CEST 2012 - ohering@suse.de
+
+- remove restart_on_update in postun section
+ the daemon can not be restarted at this point, and the new daemon
+ may not be 100 percent compatible with the currently running
+ kernel [bnc#770763]
+
+-------------------------------------------------------------------
+Wed May 16 20:44:36 CEST 2012 - ohering@suse.de
+
+- check origin of netlink messages, use recvfrom() [bnc#761200, CVE-2012-2669]
+
+-------------------------------------------------------------------
+Wed May 2 12:13:03 CEST 2012 - ohering@suse.de
+
+- update insserv part, see comments in OBS submit request #112701
+
+-------------------------------------------------------------------
+Tue Mar 27 08:50:43 CEST 2012 - ohering@suse.de
+
+- add kvptest.ps1.txt to docs, a PowerShell script to verify KVP
+
+-------------------------------------------------------------------
+Mon Mar 26 19:05:48 CEST 2012 - ohering@suse.de
+
+- update hv_kvp_daemon to 3.4-rc1 state
+ use a copy linux/hyperv.h to compile the daemon
+
+-------------------------------------------------------------------
+Thu Dec 8 17:46:21 CET 2011 - ohering@suse.de
+
+- do not package modprobe.conf rule in main package
+ prevents loading of ata_piix which is required for cdrom access
+
+-------------------------------------------------------------------
+Fri Nov 18 21:49:57 CET 2011 - ohering@suse.de
+
+- add Supplements to install package if dmi matches [bnc#731198]
+
+-------------------------------------------------------------------
+Thu Sep 1 18:51:03 CEST 2011 - ohering@suse.de
+
+- disable hyper-v-kmp
+ hv_storvsc handles now IDE and SCSI disks and ata_piix is
+ compiled into the kernel in SLE12, so the modprobe.conf rules
+ have no meaning anymore
+
+-------------------------------------------------------------------
+Tue Jul 26 21:24:25 CEST 2011 - ohering@suse.de
+
+- update hv_kvp_daemon: Cleanup kvp_get_domain_name(). If
+ getaddrinfo() fails, deal with it properly (this can happen if no
+ IP address has been assigned). Also, don't specify a specific
+ service in the call to getaddrinfo() to make this code as generic
+ as possible.
+
+-------------------------------------------------------------------
+Sun Jul 24 17:22:41 CEST 2011 - ohering@suse.de
+
+- update hv_kvp_daemon: The current win7 host does not like it when
+ we return the complete kernel release information. Conform to
+ what the host expects.
+
+-------------------------------------------------------------------
+Fri Jun 17 15:41:33 CEST 2011 - ohering@suse.de
+
+- update preun, stop_on_removal requires an argument
+
+-------------------------------------------------------------------
+Fri Jun 17 11:09:30 CEST 2011 - ohering@suse.de
+
+- remove get_release_number.sh, which was added by accident
+- bump version number to 2
+
+-------------------------------------------------------------------
+Fri Jun 17 10:58:42 CEST 2011 - ohering@suse.de
+
+- catch errors from daemon()
+
+-------------------------------------------------------------------
++++ 84 more lines (skipped)
++++ between /dev/null
++++ and /work/SRC/openSUSE:12.2:Update/.hyper-v.1955.new/hyper-v.changes
New:
----
hyper-v.changes
hyper-v.include.linux.hyperv.h
hyper-v.init.sh
hyper-v.kvptest.ps1.txt
hyper-v.spec
hyper-v.tools.hv.hv_get_dhcp_info.sh
hyper-v.tools.hv.hv_get_dns_info.sh
hyper-v.tools.hv.hv_kvp_daemon.c
hyper-v.tools.hv.hv_set_ifconfig.sh
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ hyper-v.spec ++++++
#
# spec file for package hyper-v
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define hv_kvp_daemon hv_kvp_daemon
Name: hyper-v
ExclusiveArch: %ix86 x86_64
PreReq: %insserv_prereq
Summary: Microsoft Hyper-V tools
License: GPL-2.0
Group: System/Kernel
Supplements: modalias(dmi*:svn*MicrosoftCorporation*:pn*VirtualMachine*:rn*VirtualMachine*)
Supplements: modalias(pci:v00001414d00005353sv*sd*bc*sc*i*)
Url: http://www.kernel.org
# Arbitrary version number
Version: 4
Release: 0
Source5: hyper-v.kvptest.ps1.txt
Source9: hyper-v.include.linux.hyperv.h
Source10: hyper-v.tools.hv.hv_kvp_daemon.c
Source11: hyper-v.init.sh
Source20: hyper-v.tools.hv.hv_get_dhcp_info.sh
Source21: hyper-v.tools.hv.hv_get_dns_info.sh
Source22: hyper-v.tools.hv.hv_set_ifconfig.sh
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
This package contains the Microsoft Hyper-V tools.
%prep
%setup -Tc
cp -avL %{S:5} kvptest.ps1.txt
cp -vL %{S:9} %{hv_kvp_daemon}.h
cp -vL %{S:10} %{hv_kvp_daemon}.c
%build
sed -i~ '/#include /d' %{hv_kvp_daemon}.c
gcc \
$RPM_OPT_FLAGS \
-Wno-unused-variable \
-Wno-pointer-sign \
-D_GNU_SOURCE \
-g \
%{hv_kvp_daemon}.c \
-include %{hv_kvp_daemon}.h \
-DCN_KVP_IDX=0x9 \
-DCN_KVP_VAL=0x1 \
-o %{hv_kvp_daemon}
%install
mkdir -p $RPM_BUILD_ROOT/usr/sbin
install -m755 %{hv_kvp_daemon} $RPM_BUILD_ROOT/usr/sbin
mkdir -p $RPM_BUILD_ROOT/usr/lib/%{name}/bin
cp -avL %{S:20} $RPM_BUILD_ROOT/usr/lib/%{name}/bin/hv_get_dhcp_info
cp -avL %{S:21} $RPM_BUILD_ROOT/usr/lib/%{name}/bin/hv_get_dns_info
cp -avL %{S:22} $RPM_BUILD_ROOT/usr/lib/%{name}/bin/hv_set_ifconfig
chmod 755 $RPM_BUILD_ROOT/usr/lib/%{name}/bin/*
mkdir -p $RPM_BUILD_ROOT/etc/init.d
install -m755 %{S:11} $RPM_BUILD_ROOT/etc/init.d/%{hv_kvp_daemon}
ln -sfvbn ../../etc/init.d/%{hv_kvp_daemon} $RPM_BUILD_ROOT/usr/sbin/rc%{hv_kvp_daemon}
%files
%defattr (-,root,root)
%doc kvptest.ps1.txt
/etc/init.d/%{hv_kvp_daemon}
/usr/sbin/rc%{hv_kvp_daemon}
/usr/sbin/%{hv_kvp_daemon}
/usr/lib/%{name}
%post
board_vendor=
product_name=
if pushd /sys/class/dmi/id > /dev/null 2>/dev/null
then
if test -r board_vendor
then
board_vendor="`cat board_vendor`"
fi
if test -r product_name
then
product_name="`cat product_name`"
fi
popd > /dev/null
fi
if test "${board_vendor}" = "Microsoft Corporation" -a "${product_name}" = "Virtual Machine"
then
echo "Enabling %{hv_kvp_daemon} on '${product_name}' from '${board_vendor}'"
%{insserv_force_if_yast %{hv_kvp_daemon}}
fi
%preun
%stop_on_removal %{hv_kvp_daemon}
%postun
# no restart on update because the daemon can not be restarted
%insserv_cleanup
%changelog
++++++ hyper-v.include.linux.hyperv.h ++++++
++++ 1154 lines (skipped)
++++++ hyper-v.init.sh ++++++
#!/bin/sh
#
# LSB compatible service control script; see http://www.linuxbase.org/spec/
#
### BEGIN INIT INFO
# Provides: hv_kvp_daemon
# Required-Start: $null
# Should-Start: $syslog $remote_fs $time
# Required-Stop: $null
# Should-Stop: $syslog $remote_fs $time
# Default-Start: 3 5
# Default-Stop: 0 1 2 6
# Short-Description: hv_kvp_daemon provides info to the host
# Description: Start hv_kvp_daemon to allow the host to query this guest
### END INIT INFO
# Check for missing binaries (stale symlinks should not happen)
# Note: Special treatment of stop for LSB conformance
HV_KVP_BIN=/usr/sbin/hv_kvp_daemon
test -x $HV_KVP_BIN || { echo "$HV_KVP_BIN not installed";
if [ "$1" = "stop" ]; then exit 0;
else exit 5; fi; }
. /etc/rc.status
# Reset status of this service
rc_reset
case "$1" in
start)
echo -n "Starting Hyper-V KVP daemon "
# The service can not be restarted
# IF the currently running kernel is too old, the new daemon is started
# anyway. Due to a flaw in the old kernel-user protocol the kernel
# will flood /var/log/messages with messages like:
# "hv_utils: KVP: user-mode registering done."
# This is also caused by old hyper-v.rpms which have a restart command
# in their post install script. Catch those old kernels and avoid the
# flood, which will easily fill the root partition during an upgrade.
case "`uname -r`" in
2.*) rc_failed 3 ;;
3.0.13-*) rc_failed 3 ;;
3.0.26-*) rc_failed 3 ;;
3.0.31-*) rc_failed 3 ;;
3.0.34-*) rc_failed 3 ;;
3.0.38-*) rc_failed 3 ;;
3.0.42-*) rc_failed 3 ;;
*)
env PATH=/usr/lib/hyper-v/bin:$PATH \
startproc $HV_KVP_BIN
;;
esac
rc_status -v
;;
stop)
echo -n "Shutting down Hyper-V KVP daemon "
killproc -TERM $HV_KVP_BIN
rc_status -v
;;
try-restart|condrestart)
if test "$1" = "condrestart"; then
echo "${attn} Use try-restart ${done}(LSB)${attn} rather than condrestart ${warn}(RH)${norm}"
fi
$0 status
if test $? = 0; then
$0 restart
else
rc_reset # Not running is not a failure.
fi
# Remember status and be quiet
rc_status
;;
restart)
## Stop the service and regardless of whether it was
## running or not, start it again.
$0 stop
$0 start
# Remember status and be quiet
rc_status
;;
force-reload)
echo -n "Reload service Hyper-V KVP daemon "
$0 try-restart
rc_status
;;
reload)
rc_failed 3
rc_status -v
;;
status)
echo -n "Checking for service Hyper-V KVP daemon "
checkproc $HV_KVP_BIN
rc_status -v
;;
*)
echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload}"
exit 1
;;
esac
rc_exit
++++++ hyper-v.kvptest.ps1.txt ++++++
# Windows PowerShell script to test Key Value Pair functionality
#
# http://blogs.msdn.com/b/virtual_pc_guy/archive/2008/11/18/hyper-v-script-loo...
#
# Per default execution of scripts is disabled.
# http://technet.microsoft.com/en-us/library/ee176949.aspx
# The command 'Set-ExecutionPolicy RemoteSigned' will enable it.
#
# Filter for parsing XML data
filter Import-CimXml
{
# Create new XML object from input
$CimXml = [Xml]$_
$CimObj = New-Object -TypeName System.Object
# Iterate over the data and pull out just the value name and data for each entry
foreach ($CimProperty in $CimXml.SelectNodes("/INSTANCE/PROPERTY[@NAME='Name']"))
{
$CimObj | Add-Member -MemberType NoteProperty -Name $CimProperty.NAME -Value $CimProperty.VALUE
}
foreach ($CimProperty in $CimXml.SelectNodes("/INSTANCE/PROPERTY[@NAME='Data']"))
{
$CimObj | Add-Member -MemberType NoteProperty -Name $CimProperty.NAME -Value $CimProperty.VALUE
}
# Display output
$CimObj
}
# Prompt for the Hyper-V Server to use
$HyperVServer = Read-Host "Specify the Hyper-V Server to use (enter '.' for the local computer)"
# Prompt for the virtual machine to use
$VMName = Read-Host "Specify the name of the virtual machine"
# Get the virtual machine object
$query = "Select * From Msvm_ComputerSystem Where ElementName='" + $VMName + "'"
$Vm = gwmi -namespace root\virtualization -query $query -computername $HyperVServer
# Get the KVP Object
$query = "Associators of {$Vm} Where AssocClass=Msvm_SystemDevice ResultClass=Msvm_KvpExchangeComponent"
$Kvp = gwmi -namespace root\virtualization -query $query -computername $HyperVServer
Write-Host
Write-Host "Guest KVP information for" $VMName
# Filter the results
$Kvp.GuestIntrinsicExchangeItems | Import-CimXml
++++++ hyper-v.tools.hv.hv_get_dhcp_info.sh ++++++
#!/bin/bash
# This script retrieves the DHCP state of a given interface.
# In the interest of keeping the KVP daemon code free of distro specific
# information; the kvp daemon code invokes this external script to gather
# DHCP setting for the specific interface.
#
# Input: Name of the interface
#
# Output: The script prints the string "Enabled" to stdout to indicate
# that DHCP is enabled on the interface. If DHCP is not enabled,
# the script prints the string "Disabled" to stdout.
#
# Each Distro is expected to implement this script in a distro specific
# fashion. For instance on Distros that ship with Network Manager enabled,
# this script can be based on the Network Manager APIs for retrieving DHCP
# information.
if_file="/etc/sysconfig/network/ifcfg-$1"
dhcp=$(grep -- '^BOOTPROTO=.*dhcp' "$if_file" 2>/dev/null)
if [ "$dhcp" != "" ];
then
echo "Enabled"
else
echo "Disabled"
fi
++++++ hyper-v.tools.hv.hv_get_dns_info.sh ++++++
#!/bin/bash
# This script parses /etc/resolv.conf to retrive DNS information.
# In the interest of keeping the KVP daemon code free of distro specific
# information; the kvp daemon code invokes this external script to gather
# DNS information.
# This script is expected to print the nameserver values to stdout.
# Each Distro is expected to implement this script in a distro specific
# fashion. For instance on Distros that ship with Network Manager enabled,
# this script can be based on the Network Manager APIs for retrieving DNS
# entries.
if test -r /etc/resolv.conf
then
awk -- '/^nameserver/ { print $2 }' /etc/resolv.conf
fi
++++++ hyper-v.tools.hv.hv_kvp_daemon.c ++++++
++++ 1744 lines (skipped)
++++++ hyper-v.tools.hv.hv_set_ifconfig.sh ++++++
#!/bin/bash
#
# In the interest of keeping the KVP daemon code free of distro specific
# information; the kvp daemon code invokes this external script to configure
# the interface.
#
# The only argument to this script is the configuration file that is to
# be used to configure the interface.
#
# Here is the format of the ip configuration file:
#
# HWADDR=macaddr
# DEVICE=interface name
# BOOTPROTO=<protocol> (where <protocol> is "dhcp" if DHCP is configured
# or "none" if no boot-time protocol should be used)
#
# IPADDR0=ipaddr1
# IPADDR1=ipaddr2
# IPADDRx=ipaddry (where y = x + 1)
#
# NETMASK0=netmask1
# NETMASKx=netmasky (where y = x + 1)
#
# GATEWAY=ipaddr1
# GATEWAYx=ipaddry (where y = x + 1)
#
# DNSx=ipaddrx (where first DNS address is tagged as DNS1 etc)
#
# IPV6 addresses will be tagged as IPV6ADDR, IPV6 gateway will be
# tagged as IPV6_DEFAULTGW and IPV6 NETMASK will be tagged as
# IPV6NETMASK.
#
# The host can specify multiple ipv4 and ipv6 addresses to be
# configured for the interface. Furthermore, the configuration
# needs to be persistent. A subsequent GET call on the interface
# is expected to return the configuration that is set via the SET
# call.
#
cfg=$1
if ! test -f "${cfg}"
then
: expect configuration datafile as first argument
exit 1
fi
# send subshell output to syslog
(
f=/etc/sysconfig/network/scripts/functions
if test -f ${f}
then
. ${f}
else
echo "MISSING ${f}"
exit 1
fi
# remove known config variables from environment
unset HWADDR
unset BOOTPROTO
unset DEVICE
unset ${!IPADDR*}
unset ${!NETMASK*}
unset ${!GATEWAY*}
unset ${!IPV6ADDR*}
unset ${!IPV6NETMASK*}
unset ${!IPV6_DEFAULTGW*}
unset ${!DNS*}
. "$1"
#
if test -z "${DEVICE}"
then
echo "Missing DEVICE= in ${cfg}"
exit 1
fi
#
t_ifcfg=`mktemp`
t_ifroute=`mktemp`
_exit() {
rm -f "${t_ifcfg}" "${t_ifroute}"
}
trap _exit EXIT
#
if test -z "${t_ifcfg}" || test -z "${t_ifroute}"
then
exit 1
fi
#
# Create ifcfg-* file
(
echo "STARTMODE=auto"
#
if test -n "${HWADDR}"
then
: # ignore HWADDR, it just repeats the existing MAC value
fi
#
if test "${BOOTPROTO}" = "dhcp"
then
echo "BOOTPROTO=dhcp"
elif test -n "${!IPADDR*}${!IPV6ADDR*}"
then
echo "BOOTPROTO=static"
fi
# single index for all ipv4 and ipv6 adresses in final ifcfg file
i=0
idx=""
# loop through all ipv4 adresses
for var in ${!IPADDR*}
do
index=${var#IPADDR}
pfx=
# find corresponding NETMASK variable
eval nm=\$NETMASK${index}
# if specified, calculate prefix
if test -n "${nm}"
then
pfx=`mask2pfxlen "${nm}" 2>/dev/null`
fi
# if not specified, force prefix
if test -z "${pfx}"
then
pfx="32"
fi
# construct actual value
eval val=\$IPADDR${index}
# write config variable
echo "IPADDR${idx}='${val}/${pfx}'"
idx="_$((++i))"
done
# loop through all ipv6 adresses
for var in ${!IPV6ADDR*}
do
index=${var#IPV6ADDR}
# find corresponding IPV6NETMASK variable
eval pfx=\$IPV6NETMASK${index}
# if not specified, force prefix
if test -z "${pfx}"
then
pfx=128
fi
# construct actual value
eval val=\$IPV6ADDR${index}
# write config variable
echo "IPADDR${idx}='${val}/${pfx}'"
idx="_$((++i))"
done
) >> "${t_ifcfg}"
# Create ifroute-* file
(
if test -n "${GATEWAY}"
then
echo "default $GATEWAY - $DEVICE"
fi
if test -n "${IPV6_DEFAULTGW}"
then
echo "default $IPV6_DEFAULTGW - $DEVICE"
fi
) >> "${t_ifroute}"
# Only a single default gateway is supported
unset GATEWAY IPV6_DEFAULTGW
if test -n "${!GATEWAY*}${!IPV6_DEFAULTGW*}"
then
echo "WARNING: multiple gateways not supported: ${!GATEWAY*} ${!IPV6_DEFAULTGW*}"
fi
# collect DNS info
_DNS_=
for var in ${!DNS*}
do
eval val=\$${var}
if test -n "${_DNS_}"
then
_DNS_="${_DNS_} ${val}"
else
_DNS_=${val}
fi
done
#
echo "$0: working on network interface ifcfg-${DEVICE}"
cp -fb ${t_ifcfg} "/etc/sysconfig/network/ifcfg-${DEVICE}"
cp -fb ${t_ifroute} "/etc/sysconfig/network/ifroute-${DEVICE}"
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 "${DEVICE}"
ifup "${DEVICE}"
) 2>&1 | logger -t "${0##*/}[$PPID / $$]"
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org