From 4ba28063a7a2f976e6cab3a48e81ea74a18ef6fb Mon Sep 17 00:00:00 2001 From: Dan Prince Date: Fri, 7 Feb 2014 16:15:44 -0500 Subject: [PATCH] Seed specific Fedora network configuration When building seed images on Fedora we want to disable the normal network interface naming conventions and just go with eth0. Change-Id: I8551af2d28327a36c5d21007a88057c14b7f9e2e --- .../install.d/02-seed-stack-fedora | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 elements/seed-stack-config/install.d/02-seed-stack-fedora diff --git a/elements/seed-stack-config/install.d/02-seed-stack-fedora b/elements/seed-stack-config/install.d/02-seed-stack-fedora new file mode 100755 index 000000000..ae475b8ea --- /dev/null +++ b/elements/seed-stack-config/install.d/02-seed-stack-fedora @@ -0,0 +1,21 @@ +#!/bin/bash +set -ex + +# create softlink to /dev/null which disables the net-name-slot rules +# which rename eth0 -> em1, etc. We don't want to do this on the +# seed VM +if [ -d /etc/udev/rules.d/ ]; then + ln -sf /dev/null /etc/udev/rules.d/80-net-name-slot.rules +fi + +if [ -d /etc/sysconfig/network-scripts ]; then + + # enable DHCP on eth0 for the seed + cat > /etc/sysconfig/network-scripts/ifcfg-eth0 <