26 Sep
2012
26 Sep
'12
5:20 p.m.
Brian Candler wrote:
radtest starts with /bin/sh, not /bin/bash. Are you sure this regexp-matching stuff is in a vanilla POSIX shell? I don't think it is.
Me either. FreeRADIUS runs on Linux, *BSD, Solaris, and (at one time) AIX and HPUX. Portability is good.
This bombs out if you give a non-numeric value, but then that's your fault for passing bad data. A more backwards-compatible approach is simply:
if [ "$6" != "" -a "$6" != "0" ]
That should work, I think. Alan DeKok.