forked from pool/hyper-v
- 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:
@@ -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
|
||||
|
Reference in New Issue
Block a user