Change in vdsm[master]: Rewrite isOvirt function

smizrahi at redhat.com smizrahi at redhat.com
Thu Jul 11 09:08:14 UTC 2013


Saggi Mizrahi has posted comments on this change.

Change subject: Rewrite isOvirt function
......................................................................


Patch Set 1: (1 inline comment)

....................................................
File vdsm/ovirt_functions.sh
Line 8: # LICENSE_GPL_v2 which accompany this distribution.
Line 9: #
Line 10: 
Line 11: isOvirt() {
Line 12:     [ "$(echo /etc/ovirt-node-*-release)" != "/etc/ovirt-node-*-release" ] || \
Thinking about it I think it's best to use:
test -n "$(find /etc/ -maxdepth 1 -name 'ovirt-node-*-release' -print -quit)"

Since it has no output and 'find' does the resolving so it has no corner cases.
Line 13:         [ -f /etc/rhev-hypervisor-release ]
Line 14: }
Line 15: 
Line 16: # execute a function if called as a script, e.g.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I943594e8d2cb741f5400c8036b5af9f52ec13b38
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: Alon Bar-Lev <alonbl at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi at redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server


More information about the vdsm-patches mailing list