[Linux-ha-dev] usage of variables for binaries in ocf resource scripts

Max Hofer max.hofer at apus.co.at
Mon Aug 27 07:02:44 MDT 2007


On Monday 27 August 2007, Andrew Beekhof wrote:
> On 8/25/07, Sebastian Reitenbach <sebastia at l00-bugdead-prods.de> wrote:
> > Hi,
> >
> > when I take a look into ${OCF_ROOT}/.ocf-binaries I see some definitions
> > below that comment line:
> > ...
> > # Entries that should probably be removed
> >
> > : ${BASENAME:=basename}
> > : ${BLOCKDEV:=blockdev}
> > : ${CAT:=cat}
> > : ${FSCK:=fsck}
> >
> > ...
> >
> > are these variables planned to be removed in some future version?
>
> i'd like to but probably can't (if only for legacy reasons)
I think those are a product of AUTOCONF/AUTOMAKE environment setup. The 
autotools are made to work an a LOT environments (also non POSIX conform)- 
this means also on systems where cat is not in /bin/cat or even in $PATH. 

To be cross-platform compatible the ./configure process tries to detect the 
location of the needed tools and creates the matching variables (believe me - 
if you ever tried to write m4 macros for autoconf you know how f***** 
complicate this whole system is).

The variables mentioned above make no sense for pre-compiled packages. But 
they do if you compile it on a non-POSIX system where the autotools are 
working.

The whole question boils down to the project development target:

a) does HA-Linux provide heartbeat for systems with working autotool 
environment (means also for non-POSIX systems) ---> you have to leave them 
there

b) you provide only for POSIX systems --> you can remove those variables

Regardless what the target is - ALL RA should either implement:
a) with AUTOMAKE/AUTOCONF variables
b) without those variables


>
> > should I not use these variables, and expect the binaries available
> > somewhere in $PATH?
>
> most are already required to be in the path... usually by POSIX itself
>
> but more to the point, i see no advantage to pointless indirections...
> sure some programs have equivalents (yacc, bison etc) but cat is cat.
> _______________________________________________________
> Linux-HA-Dev: Linux-HA-Dev at lists.linux-ha.org
> http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
> Home Page: http://linux-ha.org/




More information about the Linux-HA-Dev mailing list