[Linux-HA] findif does not work as before

Andrew Beekhof beekhof at gmail.com
Mon Jul 2 11:29:05 MDT 2007


On 7/1/07, Oren Nechushtan <oren at forescout.com> wrote:
> Hi,
> I believe the latest findif is broken.
>
> # ./findif 10.0.0.1
>
> ./findif version 2.1.1 Copyright Alan Robertson
>
> Usage: ./findif address[/netmask[/interface][/broadcast]]
>
> Where:
>     address: IP address of the new virtual interface
>     netmask: CIDR netmask of the network that address belongs to
>     interface: interface to add the virtual interface to
>     broadcast: broadcast address of the network that address belongs to
>
> Options:
>     -C: Output netmask as the number of bits rather than as 4 octets.
> You have mail in /var/spool/mail/root
>
> A quick debugging session shows that the argument parsing had changed.
>
>         switch (argc) {
> switch (argc) {
>         case 2: /* No -C argument */                          |
> case 1: /* No -C argument */
> ...
>         case 3: /* Hopefully a -C argument */                 |
> case 2: /* Hopefully a -C argument */
> ...
>         default:
> default:
>                 argerrs=1;
> argerrs=1;
>                 break;
> break;
>         }
> }
>         if (argerrs) {
> if (argerrs) {
>                 usage();
> usage();
>                 return(1);
> return(1);
>         }
> }
>
> Did the API change? If so, how?

nod.  alan changed it to look in the environment for its args instead.

try:
OCF_RESKEY_ip=10.0.0.1 findif

the other (optional) values are (IIRC):
OCF_RESKEY_netmask
OCF_RESKEY_broadcast
OCF_RESKEY_nic


More information about the Linux-HA mailing list