> Okay -- that seems to be a Fedora packaging issue. The .spec file that I
> release is intended to work on both RedHat/Fedora and on SuSE.
Indeed! "rpm --scripts -qp shorewall-init-4.5.14-0base.noarch.rpm" 
confirms it:

postinstall scriptlet (using /bin/sh):
[...]
if [ -f /etc/SuSE-release ]; then
    cp -pf /usr/lib/shorewall-init/ifupdown 
/etc/sysconfig/network/if-up.d/shorewall
    cp -pf /usr/lib/shorewall-init/ifupdown 
/etc/sysconfig/network/if-down.d/shorewall
    if [ -d /etc/ppp ]; then
        for directory in ip-up.d ip-down.d ipv6-up.d ipv6-down.d; do
            mkdir -p /etc/ppp/$directory
            cp -pf /usr/lib/shorewall-init/ifupdown 
/etc/ppp/$directory/shorewall
        done
    fi
else
    if [ -f /sbin/ifup-local -o -f /sbin/ifdown-local ]; then
        if ! grep -q Shorewall /sbin/ifup-local || ! grep -q Shorewall 
/sbin/ifdown-local; then
            echo "WARNING: /sbin/ifup-local and/or /sbin/ifdown-local 
already exist; ifup/ifdown events will not be handled" >&2
        else
            cp -pf /usr/lib/shorewall-init/ifupdown /sbin/ifup-local
            cp -pf /usr/lib/shorewall-init/ifupdown /sbin/ifdown-local
        fi
    else
        cp -pf /usr/lib/shorewall-init/ifupdown /sbin/ifup-local
        cp -pf /usr/lib/shorewall-init/ifupdown /sbin/ifdown-local
    fi
[...]
preuninstall scriptlet (using /bin/sh):
[...]
    [ -f /sbin/ifup-local ]   && grep -q Shorewall /sbin/ifup-local   && 
rm -f /sbin/ifup-local
    [ -f /sbin/ifdown-local ] && grep -q Shorewall /sbin/ifdown-local && 
rm -f /sbin/ifdown-local

    [ -f /etc/ppp/ip-up.local ]   && grep -q Shorewall-based 
/etc/ppp/ip-up.local   && rm -f /etc/ppp/ip-up.local
    [ -f /etc/ppp/ip-down.local ] && grep -q Shorewall-based 
/etc/ppp/ip-down.local && rm -f /etc/ppp/ip-down.local

    rm -f /etc/NetworkManager/dispatcher.d/01-shorewall
fi

So, hopefully Jonathan G. Underwood will take notice and add the 
appropriate code to shorewall.spec in all Fedora distros. In the 
meantime, if I copy these two files (from your pre-packaged .rpm file) 
directly to /sbin on the target machine, would that do the trick?

> Because the installation requirements are so different on these two distro
> families, I use logic in %post to install the ifupdown script in the
> proper places.
>   
No problem, I just needed to make sure that I am not doing something 
wrong. I'll modify my own .spec file (which is a bit different from the 
"standard" issue distributed by Fedora) to include the above logic.


------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
Shorewall-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/shorewall-users

Reply via email to