mirror of
https://gitlab.com/shorewall/code.git
synced 2024-12-22 14:20:40 +01:00
Some fixes for the RPM
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
1fcff1d9cb
commit
2fc3fa0602
@ -223,11 +223,6 @@ if [ -z "$PREFIX" ]; then
|
||||
ln -s ${DEST}/${INIT} /usr/share/shorewall-init/init
|
||||
fi
|
||||
|
||||
#
|
||||
# Install the ifupdown script
|
||||
#
|
||||
run_install $OWNERSHIP -m 744 ifupdown.sh ${PREFIX}/usr/share/shorewall-init/ifupdown
|
||||
|
||||
if [ -n "$DEBIAN" ]; then
|
||||
if [ ! -f /etc/default/shorewall-init ]; then
|
||||
run_install $OWNERSHIP -m 0644 sysconfig /etc/default/shorewall-init
|
||||
@ -235,6 +230,7 @@ if [ -n "$DEBIAN" ]; then
|
||||
else
|
||||
if [ -n "$PREFIX" ]; then
|
||||
mkdir -p ${PREFIX}/etc/sysconfig
|
||||
mkdir -p ${PREFIX}/NetworkManager/dispatcher.d
|
||||
fi
|
||||
|
||||
if [ -d ${PREFIX}/etc/sysconfig -a ! -f ${PREFIX}/etc/sysconfig/shorewall-init ]; then
|
||||
@ -242,6 +238,15 @@ else
|
||||
fi
|
||||
fi
|
||||
|
||||
#
|
||||
# Install the ifupdown script
|
||||
#
|
||||
run_install $OWNERSHIP -m 744 ifupdown.sh ${PREFIX}/usr/share/shorewall-init/ifupdown
|
||||
|
||||
if [ -d ${PREFIX}/etc/NetworkManager ]; then
|
||||
run_install ifupdown.sh ${PREFIX}/etc/NetworkManager/dispatcher.d/01-shorewall
|
||||
fi
|
||||
|
||||
if [ -z "$PREFIX" ]; then
|
||||
if [ -n "$first_install" ]; then
|
||||
if [ -n "$DEBIAN" ]; then
|
||||
@ -260,13 +265,6 @@ if [ -z "$PREFIX" ]; then
|
||||
ln -s /usr/share/shorewall-init/ifupdown /sbin/ifup-local
|
||||
ln -s /usr/share/shorewall-init/ifupdown /sbin/ifdown-local
|
||||
fi
|
||||
|
||||
if [ -d /etc/NetworkManager/dispatcher.d ]; then
|
||||
#
|
||||
# RedHat doesn't integrate ifup-local/ifdown-local with NetworkManager
|
||||
#
|
||||
ln -s /usr/share/shorewall-init/ifupdown /etc/NetworkManager/dispatcher.d/01-shorewall
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -x /sbin/insserv -o -x /usr/sbin/insserv ]; then
|
||||
|
@ -65,13 +65,6 @@ if [ $1 -eq 1 ]; then
|
||||
ln -s /usr/share/shorewall-init/ifupdown /sbin/ifup-local
|
||||
ln -s /usr/share/shorewall-init/ifupdown /sbin/ifdown-local
|
||||
fi
|
||||
|
||||
if [ -d /etc/NetworkManager/dispatcher.d ]; then
|
||||
#
|
||||
# RedHat doesn't integrate ifup-local/ifdown-local with NetworkManager
|
||||
#
|
||||
ln -s /usr/share/shorewall-init/ifupdown /etc/NetworkManager/dispatcher.d/01-shorewall
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
@ -87,10 +80,6 @@ if [ $1 -eq 0 ]; then
|
||||
[ -f /sbin/ifup-local ] && $(ls -l /sbin/ifup-local) | grep -q /usr/share/shorewall-init && rm -f /sbin/ifup-local
|
||||
[ -f /sbin/ifdown-local ] && $(ls -l /sbin/ifdown-local) | grep -q /usr/share/shorewall-init && rm -f /sbin/ifdown-local
|
||||
|
||||
rm -f /etc/sysconfig/shorewall-init
|
||||
|
||||
rm -f /etc/NetworkManager/dispatcher.d/01-shorewall
|
||||
|
||||
rm -f /etc/sysconfig/network/if-up.d/shorewall
|
||||
rm -f /etc/sysconfig/network/if-down.d/shorewall
|
||||
fi
|
||||
@ -98,6 +87,8 @@ fi
|
||||
%files
|
||||
%defattr(0644,root,root,0755)
|
||||
%attr(0644,root,root) %config(noreplace) /etc/sysconfig/shorewall-init
|
||||
%attr(0544,root,root) /etc/NetworkManager/dispatcher.d/01-shorewall
|
||||
|
||||
%attr(0544,root,root) /etc/init.d/shorewall-init
|
||||
%attr(0755,root,root) %dir /usr/share/shorewall-init
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user