[Ovirt-devel] [PATCH node] enable DHCP only on admin network interface
Alan Pevec
apevec at redhat.com
Thu Mar 19 22:14:07 UTC 2009
Signed-off-by: Alan Pevec <apevec at redhat.com>
---
scripts/ovirt-early | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/scripts/ovirt-early b/scripts/ovirt-early
index 5194446..9ab2981 100755
--- a/scripts/ovirt-early
+++ b/scripts/ovirt-early
@@ -65,7 +65,12 @@ configure_from_network() {
log "Applying default configuration to $eth and $BRIDGE"
printf '%s\n' "DEVICE=$eth" ONBOOT=yes "BRIDGE=$BRIDGE" \
> /etc/sysconfig/network-scripts/ifcfg-$eth
- printf '%s\n' "DEVICE=$BRIDGE" BOOTPROTO=dhcp \
+ if [ -z "$DEVICE" -o "$DEVICE" = "$eth" ]; then
+ dhcp="BOOTPROTO=dhcp"
+ else
+ dhcp=""
+ fi
+ printf '%s\n' "DEVICE=$BRIDGE" "$dhcp" \
ONBOOT=yes TYPE=Bridge PEERNTP=yes DELAY=0 \
> /etc/sysconfig/network-scripts/ifcfg-$BRIDGE
done
--
1.6.0.6
More information about the ovirt-devel
mailing list