diff options
| author | Lexi Winter <lexi@le-fay.org> | 2025-07-12 07:52:42 +0100 |
|---|---|---|
| committer | Lexi Winter <lexi@le-fay.org> | 2025-07-12 07:52:42 +0100 |
| commit | 799dc834e0fe94ed62c0d6bb65e6d15a639ab668 (patch) | |
| tree | bb3b7a89764f768b6b1c4a4918e9eb37a88645b8 /pf.sh | |
| download | lfldap-1.0.tar.gz lfldap-1.0.tar.bz2 | |
initial commitv1.0
Diffstat (limited to 'pf.sh')
| -rw-r--r-- | pf.sh | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -0,0 +1,20 @@ +# This source code is released into the public domain. +# +# The pf file is just a list of prefixes, so there's no formatting to do. + +PF_FILE="/etc/pf.lf-networks" + +if [ ! -f "$PF_FILE" ]; then + exit 0 +fi + +if cmp -s "$NETWORKS_FILE" "$PF_FILE"; then + exit 0 +fi + +printf '%s updated:\n\n' "$PF_FILE" +diff "$PF_FILE" "$NETWORKS_FILE" +printf '\n' + +cp "$NETWORKS_FILE" "$PF_FILE" +/etc/rc.d/pf reload |
