diff options
author | liyuenan <liyuenan@huawei.com> | 2017-03-14 15:55:08 +0800 |
---|---|---|
committer | liyuenan <liyuenan@huawei.com> | 2017-03-14 15:55:08 +0800 |
commit | 2932812260b57e7f67cef655ee2e043bf66b4887 (patch) | |
tree | 8993dc1cb40a2fc36db9cac1c883370731770a69 /deploy/adapters/cobbler | |
parent | 267fd18d744ab641338eb144e0b4cb768f323cac (diff) |
Support bond created
JIRA: -
You can add bond according to deploy/conf/network_cfg.yaml.
Change-Id: I70f2f03581cf763dbaf7a8a47bdbd46b66620fcb
Signed-off-by: liyuenan <liyuenan@huawei.com>
Diffstat (limited to 'deploy/adapters/cobbler')
3 files changed, 11 insertions, 5 deletions
diff --git a/deploy/adapters/cobbler/snippets/kickstart_post_install_network_config b/deploy/adapters/cobbler/snippets/kickstart_post_install_network_config index 2c089f92..1a5a7f66 100644 --- a/deploy/adapters/cobbler/snippets/kickstart_post_install_network_config +++ b/deploy/adapters/cobbler/snippets/kickstart_post_install_network_config @@ -426,9 +426,12 @@ declare -A used_logical_interfaces used_logical_interfaces[$iname]=$iname - #if $iface_type in ("slave","bond_slave","bridge_slave","bonded_bridge_slave") + #if $iface_type in ("slave","bridge_slave","bonded_bridge_slave") #set $static = 1 #end if + #if $ip == "" + #set $static = "" + #end if echo "DEVICE=$iname" > $devfile echo "ONBOOT=yes" >> $devfile @@ -514,7 +517,7 @@ echo "GATEWAY=$if_gateway" >> $devfile echo "NETMASK=$netmask" >> $devfile #end if #else -echo "BOOTPROTO=dhcp" >> $devfile +echo "BOOTPROTO=manual" >> $devfile #if $len($name_servers) > 0 echo "PEERDNS=no" >> $devfile #end if diff --git a/deploy/adapters/cobbler/snippets/preseed_post_install_network_config b/deploy/adapters/cobbler/snippets/preseed_post_install_network_config index cb79c556..7d4dcb9d 100644 --- a/deploy/adapters/cobbler/snippets/preseed_post_install_network_config +++ b/deploy/adapters/cobbler/snippets/preseed_post_install_network_config @@ -441,15 +441,18 @@ echo "" >> /etc/network/interfaces used_logical_interface_$iname=$iname - #if $iface_type in ("slave","bond_slave","bridge_slave","bonded_bridge_slave") + #if $iface_type in ("slave","bridge_slave","bonded_bridge_slave") #set $static = 1 #end if + #if $ip == "" + #set $static = "" + #end if echo "auto $iname" >> /etc/network/interfaces #if $static echo "iface $iname inet static" >> /etc/network/interfaces #else -echo "iface $iname inet dhcp" >> /etc/network/interfaces +echo "iface $iname inet manual" >> /etc/network/interfaces #end if #if $iface_type not in ("master","bond","bridge","bonded_bridge_slave") diff --git a/deploy/adapters/cobbler/snippets/preseed_software_ansible b/deploy/adapters/cobbler/snippets/preseed_software_ansible index cde79356..5516c893 100644 --- a/deploy/adapters/cobbler/snippets/preseed_software_ansible +++ b/deploy/adapters/cobbler/snippets/preseed_software_ansible @@ -1 +1 @@ -d-i pkgsel/include string ntp ssh openssh-server wget vim +d-i pkgsel/include string ntp ssh openssh-server wget vim ifenslave |