[Ovirt-devel] [PATCH node] Report on physical network devices when identifying the node.
Mohammed Morsi
mmorsi at redhat.com
Thu Apr 2 18:47:59 UTC 2009
Just need two small changes concerning the default config.
In the following code snippet you didn't change all the "$eth"
(previously the loop iterator) to "$DEVICE"
Also the "if [ -z "$DEVICE" -o "$DEVICE" = "$eth" ]; " check is pretty
pointless now, just need to remove it and put the "BOOTPROTO=dhcp" in
the printf string.
-Mo
Darryl L. Pierce wrote:
> + # only write a default file if one does not exist
> + if [ ! -f $ifcfg ]; then
> log "Applying default configuration to $eth and $BRIDGE"
> printf '%s\n' "DEVICE=$eth" ONBOOT=yes "BRIDGE=$BRIDGE" \
> - > /etc/sysconfig/network-scripts/ifcfg-$eth
> + > /etc/sysconfig/network-scripts/ifcfg-$eth
> if [ -z "$DEVICE" -o "$DEVICE" = "$eth" ]; then
> - dhcp="BOOTPROTO=dhcp"
> + dhcp="BOOTPROTO=dhcp"
> else
> - dhcp=""
> + dhcp=""
> fi
> printf '%s\n' "DEVICE=$BRIDGE" "$dhcp" \
> - ONBOOT=yes TYPE=Bridge PEERNTP=yes DELAY=0 \
> - > /etc/sysconfig/network-scripts/ifcfg-$BRIDGE
> - done
> - log "Default config applied"
> + ONBOOT=yes TYPE=Bridge PEERNTP=yes DELAY=0 \
> + > /etc/sysconfig/network-scripts/ifcfg-$BRIDGE
> + log "Default config applied"
> + fi
> }
>
> # $(get_live_disk)
>
More information about the ovirt-devel
mailing list