summaryrefslogtreecommitdiffstats
path: root/deploy/adapters
diff options
context:
space:
mode:
authorJustin chi <chigang@huawei.com>2017-03-27 10:15:22 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-03-27 10:15:22 +0000
commit46fb076b06060a29bbae390e93bd03a3c441a094 (patch)
tree7e8f7152050730b5d68cb0f3ae86c74483bd21d5 /deploy/adapters
parente5087aeecc7649437aa0e4e8664e77b17b3a2c11 (diff)
parent532b1906b0644d836cb5f54f32a888ada35a89fb (diff)
Merge "Fix preseed MAC address fetch method"
Diffstat (limited to 'deploy/adapters')
-rw-r--r--deploy/adapters/cobbler/snippets/preseed_post_install_network_config9
1 files changed, 1 insertions, 8 deletions
diff --git a/deploy/adapters/cobbler/snippets/preseed_post_install_network_config b/deploy/adapters/cobbler/snippets/preseed_post_install_network_config
index cb79c556..a2abbf71 100644
--- a/deploy/adapters/cobbler/snippets/preseed_post_install_network_config
+++ b/deploy/adapters/cobbler/snippets/preseed_post_install_network_config
@@ -50,14 +50,7 @@ echo "physical interfaces: \${physical_interfaces}" >> /tmp/network_log
# map physical interface to mac address
mac_names=""
for physical_interface in \${physical_interfaces}; do
- set \$(ip link show \${physical_interface})
-#if $osversion == "trusty"
- mac=\$(echo \$@ | cut -d' ' -f17)
-#elif $osversion == "xenial"
- mac=\$(echo \$@ | cut -d' ' -f17)
-#else
- mac=\$(echo \$@ | cut -d' ' -f13)
-#end if
+ mac=\$(ip link show \${physical_interface} | awk 'match(\$0,/link\/ether/) {print \$2}')
mac_name=\$(echo \${mac} |tr 'a-z' 'A-Z' | tr ':' '_')
if [ -z "\${mac_name}" ]; then
mac_names="\${mac_name}"