diff options
Diffstat (limited to 'tools/hv/hv_set_ifconfig.sh')
-rwxr-xr-x | tools/hv/hv_set_ifconfig.sh | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/tools/hv/hv_set_ifconfig.sh b/tools/hv/hv_set_ifconfig.sh index daf7ec0cd04e..735aafd64a3f 100755 --- a/tools/hv/hv_set_ifconfig.sh +++ b/tools/hv/hv_set_ifconfig.sh | |||
@@ -20,18 +20,19 @@ | |||
20 | # Here is the format of the ip configuration file: | 20 | # Here is the format of the ip configuration file: |
21 | # | 21 | # |
22 | # HWADDR=macaddr | 22 | # HWADDR=macaddr |
23 | # IF_NAME=interface name | 23 | # DEVICE=interface name |
24 | # DHCP=yes (This is optional; if yes, DHCP is configured) | 24 | # BOOTPROTO=<protocol> (where <protocol> is "dhcp" if DHCP is configured |
25 | # or "none" if no boot-time protocol should be used) | ||
25 | # | 26 | # |
26 | # IPADDR=ipaddr1 | 27 | # IPADDR0=ipaddr1 |
27 | # IPADDR_1=ipaddr2 | 28 | # IPADDR1=ipaddr2 |
28 | # IPADDR_x=ipaddry (where y = x + 1) | 29 | # IPADDRx=ipaddry (where y = x + 1) |
29 | # | 30 | # |
30 | # NETMASK=netmask1 | 31 | # NETMASK0=netmask1 |
31 | # NETMASK_x=netmasky (where y = x + 1) | 32 | # NETMASKx=netmasky (where y = x + 1) |
32 | # | 33 | # |
33 | # GATEWAY=ipaddr1 | 34 | # GATEWAY=ipaddr1 |
34 | # GATEWAY_x=ipaddry (where y = x + 1) | 35 | # GATEWAYx=ipaddry (where y = x + 1) |
35 | # | 36 | # |
36 | # DNSx=ipaddrx (where first DNS address is tagged as DNS1 etc) | 37 | # DNSx=ipaddrx (where first DNS address is tagged as DNS1 etc) |
37 | # | 38 | # |
@@ -53,11 +54,6 @@ echo "NM_CONTROLLED=no" >> $1 | |||
53 | echo "PEERDNS=yes" >> $1 | 54 | echo "PEERDNS=yes" >> $1 |
54 | echo "ONBOOT=yes" >> $1 | 55 | echo "ONBOOT=yes" >> $1 |
55 | 56 | ||
56 | dhcp=$(grep "DHCP" $1 2>/dev/null) | ||
57 | if [ "$dhcp" != "" ]; | ||
58 | then | ||
59 | echo "BOOTPROTO=dhcp" >> $1; | ||
60 | fi | ||
61 | 57 | ||
62 | cp $1 /etc/sysconfig/network-scripts/ | 58 | cp $1 /etc/sysconfig/network-scripts/ |
63 | 59 | ||