From dc7e6b86a793eca144c923f9dcfb615190f95533 Mon Sep 17 00:00:00 2001 From: MonkWho <31880166+MonkWho@users.noreply.github.com> Date: Wed, 6 May 2020 02:19:26 -0700 Subject: [PATCH] Update pfatt.sh Fixed logic with VERSION_PATCH from @neclimdul merge Added all required netgraph kernel modules for OPNsense 20.1 compatibility --- bin/pfatt.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/bin/pfatt.sh b/bin/pfatt.sh index 8fa6fde..9ec28bc 100755 --- a/bin/pfatt.sh +++ b/bin/pfatt.sh @@ -24,12 +24,21 @@ getTimestamp(){ echo "$(getTimestamp) RG_ETHER_ADDR: $RG_ETHER_ADDR" echo "$(getTimestamp) OPNSENSE: $OPNSENSE" - if [ ${OPNSENSE} = 'yes' ] || ( [ ${VERSION_MAJOR} -ge '2' ] && [ ${VERSION_MINOR} -ge '4' ] && [ ${VERSION_PATCH} -ge '5' ] ); then + if ( [ ${VERSION_MAJOR} -ge '2' ] && [ ${VERSION_MINOR} -ge '4' ] && [ ${VERSION_PATCH} -lt '5' ] ); then echo -n "$(getTimestamp) loading netgraph kernel modules... " /sbin/kldload -nq ng_etf echo "OK!" fi + if [ ${OPNSENSE} = 'yes' ]; then + /sbin/kldload -nq netgraph + /sbin/kldload -nq ng_ether + /sbin/kldload -nq ng_etf + /sbin/kldload -nq ng_vlan + /sbin/kldload -nq ng_eiface + /sbin/kldload -nq ng_one2many + fi + if [ ${OPNSENSE} != 'yes' ]; then echo -n "$(getTimestamp) attaching interfaces to ng_ether... " /usr/local/bin/php -r "pfSense_ngctl_attach('.', '$ONT_IF');"