Change in vdsm[master]: Check if libvirtd.upstart is present before copying

fsimonce at redhat.com fsimonce at redhat.com
Tue Aug 21 12:43:06 UTC 2012


Federico Simoncelli has uploaded a new change for review.

Change subject: Check if libvirtd.upstart is present before copying
......................................................................

Check if libvirtd.upstart is present before copying

If the (libvirt) packaged upstart script is present in the rpm list
of files but is absent from the filesystem the initscript was failing
because the cp command couldn't copy it. This is mostly interesting
in stripped down installations as the ovirt-node.

Signed-off-by: Federico Simoncelli <fsimonce at redhat.com>
Change-Id: I1ba7d52d21e2a072b99ffc9055327d217c78e8fc
---
M vdsm/vdsmd.init.in
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/75/7375/1

diff --git a/vdsm/vdsmd.init.in b/vdsm/vdsmd.init.in
index a57649f..a222e21 100755
--- a/vdsm/vdsmd.init.in
+++ b/vdsm/vdsmd.init.in
@@ -433,7 +433,7 @@
               /bin/grep libvirtd.upstart | /usr/bin/tail -1`
     target=/etc/init/libvirtd.conf
 
-    if ! diff -q "$packaged" "$target" >/dev/null;
+    if [[ -f "$packaged" ]] && ! diff -q "$packaged" "$target" >/dev/null;
     then
         /bin/cp -p "$packaged" "$target" || return 1
         /sbin/initctl reload-configuration


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1ba7d52d21e2a072b99ffc9055327d217c78e8fc
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Federico Simoncelli <fsimonce at redhat.com>


More information about the vdsm-patches mailing list