|
From: Georg L. <jor...@ma...> - 2016-07-28 22:34:40
|
On 28/07/16 16:19, Kevin Zheng wrote:
> On 07/28/2016 10:27, Georg Lehner wrote:
>> - The sshg-fw script stops with syntax error, a patch with some
>> improvements (hopefully) is attached.
>
> What's the purpose of the 'x' in lines like these?
>
> if [ "x$2" = "x6" ]; then
>
> Since the string literals are provided, there shouldn't be an error when
> the provided strings are empty. Isn't the 'x' there to guard against an
> empty string?
Force of habit. Consider somebody calling the function without the
second parameter, you'd get a syntax error and the script dies or
behaves erratically.
...
>> I noticed, that the sshg-fw script is wrapped together by './configure'
>> and not by 'make'. To rebuild it, you need to 'make distclean' and than
>> './configure' again. I propose either to build the script with make, or
>> document the procedure.
>
> I agree. I'll see what I can do. The main issue is that the Makefiles
> don't know what firewall backend you chose.
...
Well, my auto{conf,make}-fu is very weak, but I guess that there is a
Makefile.in which can be mangled by ./configure in a way, that the
--with-iptables parameter slips in at the right place in the respective
Makefile.
Best Regards,
Georg Lehner
|