[node-patches] Change in ovirt-node[master]: Make virt-who work again
rbarry at redhat.com
rbarry at redhat.com
Thu Oct 23 15:49:58 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: I6955630310ed9b6f23336c21014ebcafce88f0f2
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
M recipe/rhevh7-post.ks
2 files changed, 26 insertions(+), 6 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/13/34413/1
diff --git a/recipe/rhevh6-post.ks b/recipe/rhevh6-post.ks
index eab0fae..dd99fa1 100644
--- a/recipe/rhevh6-post.ks
+++ b/recipe/rhevh6-post.ks
@@ -146,10 +146,19 @@
# rhbz#734478 add virt-who (*.py are removed in rhevh image)
if [ -f /etc/rhev-hypervisor-release ]; then
- cat > /usr/bin/virt-who <<EOF_virt_who
- #!/bin/sh
- exec /usr/bin/python /usr/share/virt-who/virt-who.pyc "\$@"
+ if [ -f /usr/share/virt-who/virt-who.pyc ]; then
+ cat > /usr/bin/virt-who <<EOF_virt_who
+ #!/bin/sh
+ exec /usr/bin/python /usr/share/virt-who/virt-who.pyc "\$@"
EOF_virt_who
+ elif [ -f /usr/share/virt-who/virtwho.pyc ]; then
+ cat > /usr/bin/virt-who <<EOF_virt_who
+ #!/bin/sh
+ exec /usr/bin/python /usr/share/virt-who/virtwho.pyc "\$@"
+EOF_virt_who
+ else
+ echo "Couldn't find a known virt-who executable. Please check"
+ fi
fi
# set maxlogins to 3
diff --git a/recipe/rhevh7-post.ks b/recipe/rhevh7-post.ks
index c9a07af..12b5810 100644
--- a/recipe/rhevh7-post.ks
+++ b/recipe/rhevh7-post.ks
@@ -130,10 +130,21 @@
echo "files /var/lib/nfs" >> /etc/rwtab
# 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
+ if [ -f /usr/share/virt-who/virt-who.pyc ]; then
+ cat > /usr/bin/virt-who <<EOF_virt_who
+ #!/bin/sh
+ exec /usr/bin/python /usr/share/virt-who/virt-who.pyc "\$@"
EOF_virt_who
+ elif [ -f /usr/share/virt-who/virtwho.pyc ]; then
+ cat > /usr/bin/virt-who <<EOF_virt_who
+ #!/bin/sh
+ exec /usr/bin/python /usr/share/virt-who/virtwho.pyc "\$@"
+EOF_virt_who
+ else
+ echo "Couldn't find a known virt-who executable. Please check"
+ fi
+fi
# set maxlogins to 3
echo "* - maxlogins 3" >> /etc/security/limits.conf
--
To view, visit http://gerrit.ovirt.org/34413
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I6955630310ed9b6f23336c21014ebcafce88f0f2
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Ryan Barry <rbarry at redhat.com>
More information about the node-patches
mailing list