add new entries one per line.  then if one line fails due to an
unresolvable name, your other lines won't be affected:

pfctl -t goodguys -T add host1.no-ip.org
pfctl -t goodguys -T add host2.no-ip.org
pfctl -t goodguys -T add no-such-name.xxx.yyy
pfctl -t goodguys -T www.host3.nu

in the above example, a failure of any one line (such as line 3) won't
prevent your other lines from being attempted.

-ken

On Mon, Mar 9, 2015 at 12:16 PM, Leslie Jensen <jensen.les...@gmail.com>
wrote:

> Hello list.
>
> I have a problem with a simple script I've written to keep two tables up
> to date. I have a few hosts I need to give access to my LAN via the table
> goodguys. With these hosts being on a dynamic IP address I have to have
> them registered via no-ip.
>
> If the look up of FQDN for one of the hosts in my script fails the
> remaining hosts and IP-addresses will not be added to the table goodguys.
>
> I'm aware that this is a case of poor scripting and I would very much like
> your feedback on how I can avoid an unknown host to make my script fail.
>
> Thank you :-)
>
> /Leslie
>
>
> My script:
>
> #!/bin/sh
> #
> #
> pfctl -F Tables
> #
> #
> pfctl -t goodguys -T add host1.no-ip.org host2.no-ip.org www.host3.nu
> ipa.ddr.ess.002 ipa.ddr.ess.001
> #
> #
> pfctl -t goodguys2 -T add ipa.ddr.ess.003 ipa.ddr.ess.004 ipa.ddr.ess.005
> #
> #
> pfctl -T show -t goodguys
> pfctl -T show -t goodguys2
>
>

Reply via email to