[Ovirt-devel] [PATCH node] NTP and DNS information are persisted. rhbz#505342

Darryl L. Pierce dpierce at redhat.com
Thu Jun 11 17:44:43 UTC 2009


Adds a call to persist the file /etc/ntp.conf after it has been setup
and the configuration saved.

DNS details are inserted into the bridge configuration file for the
management NIC being defined.

Signed-off-by: Darryl L. Pierce <dpierce at redhat.com>
---
 scripts/ovirt-config-networking |   13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/scripts/ovirt-config-networking b/scripts/ovirt-config-networking
index 4d31401..a536760 100755
--- a/scripts/ovirt-config-networking
+++ b/scripts/ovirt-config-networking
@@ -189,6 +189,11 @@ function configure_interface
 
 function configure_dns
 {
+    if [[ -z "${CONFIGURED_NIC}" ]]; then
+        printf "\nYou must configure a network interface first.\n\n"
+        return
+    fi
+
     local DNS=$1
     local AUTO=$2
     if [[   "$AUTO" == "AUTO"    &&
@@ -196,8 +201,8 @@ function configure_dns
         DNS=$OVIRT_DNS
     fi
 
-    local IF_FILENAME="$WORKDIR/augtool-lo"
-    local IF_ROOT="$CONFIG_FILE_ROOT-lo"
+    local IF_FILENAME="$WORKDIR/augtool-br${CONFIGURED_NIC}"
+    local IF_ROOT="$CONFIG_FILE_ROOT-br${CONFIGURED_NIC}"
     local IF_CONFIG=
 
     if [ -z "$AUTO" ]; then
@@ -344,7 +349,9 @@ if ls "$WORKDIR"/augtool-* > /dev/null 2>&1 ; then
     if [ $? = 0 ]; then
         log "Network configured successfully"
         net_configured=1
-        ovirt_store_config /etc/sysconfig/network-scripts/ifcfg*
+        ovirt_store_config \
+            /etc/sysconfig/network-scripts/ifcfg* \
+            $NTP_CONFIG_FILE
     else
         log "Error configuring network, see $OVIRT_LOGFILE"
         stop_log
-- 
1.6.0.6




More information about the ovirt-devel mailing list