[Ovirt-devel] [PATCH node] Only allow initial networking to be configured. bz#507393
Darryl L. Pierce
dpierce at redhat.com
Mon Jun 22 18:23:49 UTC 2009
If an existing bridge configuration is detected, then an error message
is shown to the user and the script exits.
Signed-off-by: Darryl L. Pierce <dpierce at redhat.com>
---
scripts/ovirt-config-networking | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/scripts/ovirt-config-networking b/scripts/ovirt-config-networking
index d29bd12..4081a9d 100755
--- a/scripts/ovirt-config-networking
+++ b/scripts/ovirt-config-networking
@@ -26,6 +26,14 @@ if ! is_local_storage_configured; then
exit 99
fi
+# if the network is already configured, then exit the script
+ls /etc/sysconfig/network-scripts/ifcfg-br* > /dev/null 2>&1
+
+if [ $? -eq 0 ]; then
+ printf "\nExisting network configuration detected. Aborting...\n\n"
+ exit 99
+fi
+
function configure_interface
{
local NIC=$1
--
1.6.0.6
More information about the ovirt-devel
mailing list