On 2023-10-21, at 11:53:54 +0300, Vincas Dargis wrote: > I've noticed NEWS after NetworkManager upgrade about no longer supporting > if-* scripts, and now `shorewall status` says `Shorewall is stopped` :/ . > > Any ideas how to "workaround" it?
I am working on a fix atm. My plan is to add a dispatcher script for Shorwall that calls the ifupdown script to the shorewall-init package. The script installed by the package will go into: /usr/lib/NetworkManager/dispatcher.d If you choose to install one manually it goes into: /etc/NetworkManager/dispatcher.d The script will look something like the attached (currently untested). J.
#!/bin/sh if ! [ "$1" ] || [ "$1" = none ]; then exit 0 fi export IFACE="$1" case "$2" in up) export MODE="start" export PHASE="post-up" IFUPDOWN=/etc/network/if-up.d/shorewall ;; down) export MODE="stop" export PHASE="post-down" IFUPDOWN=/etc/network/if-post-down.d/shorewall ;; *) exit 0 ;; esac if [ "$IP4_NUM_ADDRESSES" ] && [ "$IP4_NUM_ADDRESSES" -gt 0 ]; then ADDRESS_FAMILIES="$ADDRESS_FAMILIES inet" fi if [ "$IP6_NUM_ADDRESSES" ] && [ "$IP6_NUM_ADDRESSES" -gt 0 ]; then ADDRESS_FAMILIES="$ADDRESS_FAMILIES inet6" fi [ "$ADDRESS_FAMILIES" ] || ADDRESS_FAMILIES="inet" for i in $ADDRESS_FAMILIES; do export ADDRFAM="$i" $IFUPDOWN done
signature.asc
Description: PGP signature