- 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 OBS-URL: https://build.opensuse.org/package/show/Virtualization/hyper-v?expand=0&rev=44
This commit is contained in:
parent
dad8c5cef7
commit
42570cdfd6
@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
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
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
# This example script retrieves the DHCP state of a given interface.
|
||||
# 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.
|
||||
@ -16,9 +16,9 @@
|
||||
# this script can be based on the Network Manager APIs for retrieving DHCP
|
||||
# information.
|
||||
|
||||
if_file="/etc/sysconfig/network-scripts/ifcfg-"$1
|
||||
if_file="/etc/sysconfig/network/ifcfg-$1"
|
||||
|
||||
dhcp=$(grep "dhcp" $if_file 2>/dev/null)
|
||||
dhcp=$(grep -- '^BOOTPROTO=.*dhcp' "$if_file" 2>/dev/null)
|
||||
|
||||
if [ "$dhcp" != "" ];
|
||||
then
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
# This example script parses /etc/resolv.conf to retrive DNS information.
|
||||
# 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.
|
||||
@ -10,4 +10,7 @@
|
||||
# this script can be based on the Network Manager APIs for retrieving DNS
|
||||
# entries.
|
||||
|
||||
cat /etc/resolv.conf 2>/dev/null | awk '/^nameserver/ { print $2 }'
|
||||
if test -r /etc/resolv.conf
|
||||
then
|
||||
awk -- '/^nameserver/ { print $2 }' /etc/resolv.conf
|
||||
fi
|
||||
|
@ -77,7 +77,7 @@ then
|
||||
fi
|
||||
|
||||
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
|
||||
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…
x
Reference in New Issue
Block a user