Update pfatt.sh

Fixed logic with VERSION_PATCH from @neclimdul merge

Added all required netgraph kernel modules for OPNsense 20.1 compatibility
This commit is contained in:
MonkWho 2020-05-06 02:19:26 -07:00 committed by GitHub
parent 0c5149e943
commit dc7e6b86a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 1 deletions

View File

@ -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');"