Alan Pevec
2009-Mar-19 22:14 UTC
[Ovirt-devel] [PATCH node] enable DHCP only on admin network interface
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
Hugh O. Brock
2009-Mar-20 04:53 UTC
[Ovirt-devel] [PATCH node] enable DHCP only on admin network interface
On Thu, Mar 19, 2009 at 11:14:07PM +0100, Alan Pevec wrote:> 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 > doneThat's what we need, Alan... ACK. And muchas gracias by the way. --Hugh