From: root <r...@chappy.(none)>

Use ovirt-config-logging in /etc/init.d/ovirt
---
 scripts/ovirt                |   19 ++++---------------
 scripts/ovirt-config-logging |    2 +-
 scripts/ovirt-functions      |    4 ++++
 3 files changed, 9 insertions(+), 16 deletions(-)

diff --git a/scripts/ovirt b/scripts/ovirt
index 4ff03f2..0c5e3be 100755
--- a/scripts/ovirt
+++ b/scripts/ovirt
@@ -14,6 +14,9 @@ start() {
     if is_standalone; then
         return 0
     fi
+
+    ovirt-config-logging AUTO
+
     find_srv ipa tcp
     if [ -n "$SRV_HOST" -a -n "$SRV_PORT" ]; then
         krb5_conf=/etc/krb5.conf
@@ -43,21 +46,7 @@ start() {
         log "skipping ovirt-awake, oVirt identify service not available"
     fi
 
-    find_srv collectd udp
-    if [ -n "$SRV_HOST" -a -n "$SRV_PORT" ]; then
-        collectd_conf=/etc/collectd.conf
-        if [ -f $collectd_conf.in ]; then
-            sed -e "s/@COLLECTD_SERVER@/$SRV_HOST/" \
-                -e "s/@COLLECTD_PORT@/$SRV_PORT/" \
-                -e "/<Plugin rrdtool>/,/<\/Plugin>/d" $collectd_conf.in \
-                > $collectd_conf
-            if [ $? -ne 0 ]; then
-                log "Failed to write $collectd_conf"; return 1
-            fi
-        fi
-    else
-        log "skipping collectd configuration, collectd service not available"
-    fi
+    ovirt-config-collectd AUTO
 
     find_srv qpidd tcp
     if [ -n "$SRV_HOST" -a -n "$SRV_PORT" ]; then
diff --git a/scripts/ovirt-config-logging b/scripts/ovirt-config-logging
index d8e5c95..598b7cb 100755
--- a/scripts/ovirt-config-logging
+++ b/scripts/ovirt-config-logging
@@ -8,7 +8,7 @@
 trap '__st=$?; stop_log; exit $__st' 0
 trap 'exit $?' 1 2 13 15
 
-if ! is_local_storage_configured; then
+if ! is_local_storage_configured && ! is_diskless ; then
     printf "Local storage must be configured prior to configuring the logging 
system.\n"
     exit 99
 fi
diff --git a/scripts/ovirt-functions b/scripts/ovirt-functions
index 98e88e7..f86543e 100644
--- a/scripts/ovirt-functions
+++ b/scripts/ovirt-functions
@@ -88,6 +88,10 @@ is_local_storage_configured () {
     return 1
 }
 
+is_diskless() {
+    grep -q '/dev/mapper/live-rw /' /proc/mounts
+}
+
 # perform automatic local disk installation
 # when at least following boot parameters are present:
 # for networking - OVIRT_BOOTIF, management NIC
-- 
1.6.2.5

_______________________________________________
Ovirt-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/ovirt-devel

Reply via email to