Accepting request 139921 from Virtualization
- update hv_set_ifconfig to work with our ifcfg - update kv_kvp_daemon to 3.7-rc1 state [fate#314441] OBS-URL: https://build.opensuse.org/request/show/139921 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/hyper-v?expand=0&rev=7
This commit is contained in:
commit
7dcf4a296c
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
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
|
||||
|
||||
@ -9,7 +14,7 @@ Sat Oct 13 11:40:30 CEST 2012 - ohering@suse.de
|
||||
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#31441]
|
||||
- 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
|
||||
|
@ -1,7 +1,4 @@
|
||||
#!/bin/bash
|
||||
|
||||
# This example script activates an interface based on the specified
|
||||
# configuration.
|
||||
#
|
||||
# In the interest of keeping the KVP daemon code free of distro specific
|
||||
# information; the kvp daemon code invokes this external script to configure
|
||||
@ -10,13 +7,6 @@
|
||||
# The only argument to this script is the configuration file that is to
|
||||
# be used to configure the interface.
|
||||
#
|
||||
# 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 configuring the
|
||||
# interface.
|
||||
#
|
||||
# This example script is based on a RHEL environment.
|
||||
#
|
||||
# Here is the format of the ip configuration file:
|
||||
#
|
||||
# HWADDR=macaddr
|
||||
@ -45,24 +35,49 @@
|
||||
# is expected to return the configuration that is set via the SET
|
||||
# call.
|
||||
#
|
||||
|
||||
|
||||
|
||||
echo "IPV6INIT=yes" >> $1
|
||||
echo "NM_CONTROLLED=no" >> $1
|
||||
echo "PEERDNS=yes" >> $1
|
||||
echo "ONBOOT=yes" >> $1
|
||||
|
||||
dhcp=$(grep "DHCP" $1 2>/dev/null)
|
||||
if [ "$dhcp" != "" ];
|
||||
cfg=$1
|
||||
if ! test -f "${cfg}"
|
||||
then
|
||||
echo "BOOTPROTO=dhcp" >> $1;
|
||||
: expect configuration datafile as first argument
|
||||
exit 1
|
||||
fi
|
||||
#
|
||||
(
|
||||
unset DHCP
|
||||
unset IF_NAME
|
||||
. "$1"
|
||||
if test -z "${IF_NAME}"
|
||||
then
|
||||
echo "Missing IF_NAME= in ${cfg}"
|
||||
exit 1
|
||||
fi
|
||||
#
|
||||
t=`mktemp`
|
||||
if test -z "${t}"
|
||||
then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cp $1 /etc/sysconfig/network-scripts/
|
||||
_exit() {
|
||||
rm -f "${t}"
|
||||
}
|
||||
trap _exit EXIT
|
||||
#
|
||||
cat >> "${t}" <<_EOF_
|
||||
# contents from $0 $*
|
||||
`cat "${cfg}"`
|
||||
#
|
||||
# additional options:
|
||||
STARTMODE=auto
|
||||
_EOF_
|
||||
|
||||
if test "${DHCP}" = "yes"
|
||||
then
|
||||
echo "BOOTPROTO=dhcp" >> ${t};
|
||||
fi
|
||||
|
||||
interface=$(echo $1 | awk -F - '{ print $2 }')
|
||||
|
||||
/sbin/ifdown $interface 2>/dev/null
|
||||
/sbin/ifup $interfac 2>/dev/null
|
||||
echo "$0: working on network interface ifcfg-${IF_NAME}"
|
||||
cp -b ${t} /etc/sysconfig/network/ifcfg-${IF_NAME}
|
||||
ifdown ${IF_NAME} -o hotplug
|
||||
ifup ${IF_NAME} -o hotplug
|
||||
) 2>&1 | logger -t "${0##*/}[$PPID / $$]"
|
||||
|
Loading…
Reference in New Issue
Block a user