diff options
| author | Kristof Provost <kp@FreeBSD.org> | 2026-06-24 10:21:20 +0000 |
|---|---|---|
| committer | Kristof Provost <kp@FreeBSD.org> | 2026-06-28 13:59:35 +0000 |
| commit | e4f3ab161a9e149fd2f657f6d8af2ba3c618255f (patch) | |
| tree | b4d39639c7d18ff6acce6f0aa09f349d522d8370 /libexec | |
| parent | be23edc1e4028e32a46e8fe7118de787fd5d79a2 (diff) | |
Diffstat (limited to 'libexec')
| -rwxr-xr-x | libexec/rc/rc.d/pflog | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/libexec/rc/rc.d/pflog b/libexec/rc/rc.d/pflog index b47252a23e0f..8441e56eb8f6 100755 --- a/libexec/rc/rc.d/pflog +++ b/libexec/rc/rc.d/pflog @@ -27,18 +27,11 @@ pflog_prestart() { load_kld pflog || return 1 - # create pflog_dev interface if needed - if ! ifconfig $pflog_dev > /dev/null 2>&1; then - if ! ifconfig $pflog_dev create; then - warn "could not create $pflog_dev." - return 1 - fi - fi - - # set pflog_dev interface to up state - if ! ifconfig $pflog_dev up; then - warn "could not bring up $pflog_dev." - return 1 + # Do we need to create more devices? + unit=${pflog_dev#pflog} + max=$(sysctl -n net.pflog.if_count) + if [ "$unit" -ge "$max" ]; then + sysctl net.pflog.if_count=$(expr ${unit} + 1) fi # -p flag requires stripping pidfile's leading /var/run and trailing .pid @@ -53,11 +46,6 @@ pflog_prestart() pflog_poststop() { - if ! ifconfig $pflog_dev down; then - warn "could not bring down $pflog_dev." - return 1 - fi - if [ "$pflog_instances" ] && [ -n "$pflog_instances" ]; then rm $pidfile fi |
