From mboxrd@z Thu Jan 1 00:00:00 1970 From: Fabio M. Di Nitto Date: Fri, 22 Nov 2013 19:35:16 +0100 Subject: [Cluster-devel] [PATCH 1/2] fence_ipmilan: port fencing agent to fencing library In-Reply-To: <20131122161850.GC9777@redhat.com> References: <356610666.2341611.1385047003114.JavaMail.root@redhat.com> <528E2B52.2070201@redhat.com> <20131122161850.GC9777@redhat.com> Message-ID: <528FA3E4.8030507@redhat.com> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit On 11/22/2013 5:18 PM, Jan Pokorn? wrote: > On 21/11/13 16:48 +0100, Fabio M. Di Nitto wrote: >> On 11/21/2013 4:16 PM, Ondrej Mular wrote: >>> +PATHS = ["/usr/local/bull/NSMasterHW/bin/ipmitool", >>> + "/usr/bin/ipmitool", >>> + "/usr/sbin/ipmitool", >>> + "/bin/ipmitool", >>> + "/sbin/ipmitool", >>> + "/usr/local/bin/ipmitool", >>> + "/usr/local/sbin/ipmitool"] >> >> this hard-cording it bad. >> >> Always use OS define PATH and if really necessary allow user to override >> with an option (for example: --pathtoipmitool=/usr/local....) > > see, e.g., > http://git.engineering.redhat.com/users/jpokorny/clufter/tree/utils.py?id=d37db7470f4e44598af0b91d02221182178677ff#n22 > that mimics "which" standard utility > > Hope this helps > I?d like to understand why we need a search path in the first place tho and we can?t just rely on shell hitting the right tool :) Fabio