[node-patches] Change in ovirt-node[master]: Make virt-who work again

dougsland at redhat.com dougsland at redhat.com
Thu Oct 23 16:05:39 UTC 2014


Douglas Schilling Landgraf has posted comments on this change.

Change subject: Make virt-who work again
......................................................................


Patch Set 1:

(1 comment)

http://gerrit.ovirt.org/#/c/34413/1/recipe/rhevh6-post.ks
File recipe/rhevh6-post.ks:

Line 157:         exec /usr/bin/python /usr/share/virt-who/virtwho.pyc "\$@"
Line 158: EOF_virt_who
Line 159:     else
Line 160:         echo "Couldn't find a known virt-who executable. Please check"
Line 161:     fi
Hi Ryan,

Thanks for the patch.
What about avoid the duplicate of code running something similar to:

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
Line 162: fi
Line 163: 
Line 164: # set maxlogins to 3
Line 165: 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: comment
Gerrit-Change-Id: I6955630310ed9b6f23336c21014ebcafce88f0f2
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Ryan Barry <rbarry at redhat.com>
Gerrit-Reviewer: Douglas Schilling Landgraf <dougsland at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-HasComments: Yes



More information about the node-patches mailing list