zcip left ip blank

Denys Vlasenko vda.linux at googlemail.com
Fri Jul 24 18:26:26 UTC 2009


On Friday 24 July 2009 09:12, kate katty wrote:
>  Thank you Denys for the response !!
> 
> I've attached my zcip.script please find the same in this mail.
> zcip.script called  inside a child process via execl()
> i.e
>  execl(script, script, arg, prefix, NULL)
> 
> Guessing that if zcip.script exit with non zero then it'll return back
> without allocation ip
> How could I check whether zcip.script returns zero (exit 0) or non-zero
> (exit 1)

It returns 1 here:

        if [ "x$2" = x ]
	then
		exit 1
	fi

I don't know why your script expects to have parameter #2.
zcip does not provide it.

It looks like your script thinks that $2 is the mask:

        exec ip address add dev $interface \
              "$ip/$2" broadcast + 2>&1

It should use 16 instead of $2:

        exec ip address add dev $interface \
              "$ip/16" broadcast + 2>&1

--
vda


More information about the busybox mailing list