[node-patches] Change in ovirt-node[master]: ovirt-init-functions: validation for systemd-journald

dougsland at redhat.com dougsland at redhat.com
Thu Aug 7 12:26:27 UTC 2014


Douglas Schilling Landgraf has uploaded a new change for review.

Change subject: ovirt-init-functions: validation for systemd-journald
......................................................................

ovirt-init-functions: validation for systemd-journald

Currently we run service systemd-journald restart on init
for all oVirt Node images. However, we still support distros
which doesn't contain systemd. This patch adds a validation
to execute the systemd-journald only for systemd systems.

Change-Id: I5dc0becfb0b54d4972254ec2a30df15c9f5b480a
Signed-off-by: Douglas Schilling Landgraf <dougsland at redhat.com>
---
M scripts/ovirt-init-functions.sh.in
1 file changed, 5 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/03/31203/1

diff --git a/scripts/ovirt-init-functions.sh.in b/scripts/ovirt-init-functions.sh.in
index 8490ec3..d1de93d 100644
--- a/scripts/ovirt-init-functions.sh.in
+++ b/scripts/ovirt-init-functions.sh.in
@@ -1382,8 +1382,11 @@
         # Create a minimalistic /etc/hosts if it's empty, rhbz#829753
         create_minimal_etc_hosts_file
 
-        # Restart jorunald to pick up /var/log/journal
-        service systemd-journald restart
+        if [ -f /usr/lib/systemd/system/systemd-journald.service ];
+        then
+            # Restart jorunald to pick up /var/log/journal
+            service systemd-journald restart
+        fi
 
         # Add symlink for libguestfs
         if [ -f /dev/.initramfs/live/vmlinuz0 ];


-- 
To view, visit http://gerrit.ovirt.org/31203
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5dc0becfb0b54d4972254ec2a30df15c9f5b480a
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Douglas Schilling Landgraf <dougsland at redhat.com>



More information about the node-patches mailing list