|
OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below. |
|
Thread Tools | Display Modes |
|
|||
Bash and pfctl = problem
Hello,
I would like to write a script that is able to check if file pf.conf has any errors: command: pfctl -n -f pf.conf now: - if configuration file is OK there will be no response - if configuration file in not OK, then some error may come up syntax error this one is OK, but neither way Bash can't see it, apart from that, I can't neither take it over nor save it to the file and simple intruction: var1=`/sbin/pfctl -n -f /etc/pf.test.conf` if [ -z "$var1" ]; then echo OK else echo not OK fi But each time the replay is OK, no matter if the configuration file has some errors or doesn't have any. Therefore, does anybody have any idea how to check if the configuration file is OK and after that, how to transfer the result to Bash script? Thank you. |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
pfctl anchors manipulation clarification on 4.7 | sgeorge | OpenBSD Security | 0 | 2nd July 2010 05:16 AM |
flush states pfctl | joostvgh | OpenBSD Security | 3 | 27th January 2010 06:50 PM |
Changing shell to bash | rex | FreeBSD General | 13 | 29th August 2008 03:20 AM |
Is bash included in OpenBSD? | bsdnewbie999 | OpenBSD General | 21 | 2nd August 2008 02:57 AM |
pfctl -s info counters don't change | audio | FreeBSD Security | 2 | 16th July 2008 11:01 PM |