[node-patches] Change in ovirt-node[node-3.0]: Make virt-who work again
rbarry at redhat.com
rbarry at redhat.com
Fri Nov 7 16:27:46 UTC 2014
Ryan Barry has uploaded a new change for review.
Change subject: Make virt-who work again
......................................................................
Make virt-who work again
The virt-who developers changed the structure of the package a bit
and we need to tweak a bit to account. Also, futureproof EL7 a
little since this change will probably land there as well.
Change-Id: I09593645a5a66da45fd8574dee2fb93d5c60d7f9
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1152414
Signed-off-by: Ryan Barry <rbarry at redhat.com>
---
M recipe/rhevh6-post.ks
1 file changed, 16 insertions(+), 3 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/44/34944/1
diff --git a/recipe/rhevh6-post.ks b/recipe/rhevh6-post.ks
index 438b576..6f3c5cf 100644
--- a/recipe/rhevh6-post.ks
+++ b/recipe/rhevh6-post.ks
@@ -145,10 +145,23 @@
EOF_start_udev
# rhbz#734478 add virt-who (*.py are removed in rhevh image)
-cat > /usr/bin/virt-who <<EOF_virt_who
-#!/bin/sh
-exec /usr/bin/python /usr/share/virt-who/virt-who.pyc "\$@"
+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
+
+ 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 "\$@"
EOF_virt_who
+ fi
+fi
# set maxlogins to 3
echo "* - maxlogins 3" >> /etc/security/limits.conf
--
To view, visit http://gerrit.ovirt.org/34944
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I09593645a5a66da45fd8574dee2fb93d5c60d7f9
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: node-3.0
Gerrit-Owner: Ryan Barry <rbarry at redhat.com>
More information about the node-patches
mailing list