Hi Leslie, Am 09.03.2015 um 17:16 schrieb Leslie Jensen: > 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. > I really hope my answer doesn't sound stupid but why not add those hosts one by one? If one add fails, the other will still succeed. 'pfctl -T add' might even give you a return code for every add (didn't try it myself, sorry). Or even better put those names in a little file and add it with '-T add -f <file>' (from the manpage):
'For the add, delete, replace, and test commands, the list of addresses can be specified either directly on the command line and/or in an unformatted text file, using the -f flag.' Best regards, Urs