[node-patches] Change in ovirt-node[master]: recipe: Fix virt-who call
fabiand at redhat.com
fabiand at redhat.com
Mon Nov 10 14:43:20 UTC 2014
Fabian Deutsch has uploaded a new change for review.
Change subject: recipe: Fix virt-who call
......................................................................
recipe: Fix virt-who call
The condition around the virt-who fix sometimes does not evaluate to
true, if the file is created after the virt-who snippet.
Change-Id: Iafa3787ccc7d817c8183ceb3b8450605bfa963df
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1152414
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1158497
Signed-off-by: Fabian Deutsch <fabiand at fedoraproject.org>
---
M recipe/rhevh6-post.ks
1 file changed, 16 insertions(+), 14 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/06/35006/1
diff --git a/recipe/rhevh6-post.ks b/recipe/rhevh6-post.ks
index f35344b..6b206cc 100644
--- a/recipe/rhevh6-post.ks
+++ b/recipe/rhevh6-post.ks
@@ -165,22 +165,24 @@
EOF_start_udev
# rhbz#734478 add virt-who (*.py are removed in rhevh image)
-if [ -f /etc/rhev-hypervisor-release ]; then
- cmd_who=""
- if [ -f /usr/share/virt-who/virt-who.pyc ]; then
- cmd_who="virt-who.pyc"
- elif [ -f /usr/share/virt-who/virtwho.pyc ]; then
- cmd_who="virtwho.pyc"
- else
- echo "Couldn't find a known virt-who executable. Please check"
- fi
+cmd_who=""
+if [ -f /usr/share/virt-who/virt-who.pyc ]; then
+ cmd_who="virt-who.pyc"
+elif [ -f /usr/share/virt-who/virtwho.pyc ]; then
+ cmd_who="virtwho.pyc"
+else
+ echo "Couldn't find a known virt-who executable. Please check"
+fi
- if [ ! -z $cmd_who ]; then
- cat > /usr/bin/virt-who <<EOF_virt_who
- #!/bin/sh
- exec /usr/bin/python /usr/share/virt-who/$cmd_who "\$@"
+if [ -z $cmd_who ]; then
+ echo "Found no virt-who module"
+else
+ echo "Found virt-who, creating bin"
+ cat > /usr/bin/virt-who <<EOF_virt_who
+ #!/bin/sh
+ exec /usr/bin/python /usr/share/virt-who/$cmd_who "\$@"
EOF_virt_who
- fi
+ chmod a+x /usr/bin/virt-who
fi
# set maxlogins to 3
--
To view, visit http://gerrit.ovirt.org/35006
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iafa3787ccc7d817c8183ceb3b8450605bfa963df
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Fabian Deutsch <fabiand at redhat.com>
More information about the node-patches
mailing list