Add Makefile so that -f will work under Shorewall Lite

git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@3988 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
teastep 2006-06-05 17:13:48 +00:00
parent b5c86460a6
commit e1e053d8e7
3 changed files with 24 additions and 0 deletions

17
Shorewall-lite/Makefile Normal file
View File

@ -0,0 +1,17 @@
# Shorewall Makefile to restart if config-files are newer than last restart
VARDIR=/var/lib/shorewall
SHAREDIR=/usr/share/shorewall
RESTOREFILE?=.restore
all: $(VARDIR)/${RESTOREFILE}
$(VARDIR)/${RESTOREFILE}: $(SHAREDIR)/firewall
@/sbin/shorewall -q save >/dev/null; \
if \
/sbin/shorewall -q restart >/dev/null 2>&1; \
then \
/sbin/shorewall -q save >/dev/null; \
else \
/sbin/shorewall -q restart 2>&1 | tail >&2; \
fi
# EOF

View File

@ -266,6 +266,12 @@ if [ -n "$ARCHLINUX" ] ; then
sed -e 's!LOGFILE=/var/log/messages!LOGFILE=/var/log/messages.log!' -i ${PREFIX}/etc/shorewall/shorewall.conf sed -e 's!LOGFILE=/var/log/messages!LOGFILE=/var/log/messages.log!' -i ${PREFIX}/etc/shorewall/shorewall.conf
fi fi
#
# Install the Makefile
#
run_install $OWNERSHIP -m 0600 Makefile ${PREFIX}/etc/shorewall/Makefile
echo "Makefile installed as ${PREFIX}/etc/shorewall/Makefile"
# #
# Install the default config path file # Install the default config path file
# #

View File

@ -63,6 +63,7 @@ fi
%defattr(0644,root,root,0755) %defattr(0644,root,root,0755)
%attr(0755,root,root) %dir /etc/shorewall %attr(0755,root,root) %dir /etc/shorewall
%attr(0644,root,root) %config(noreplace) /etc/shorewall/shorewall.conf %attr(0644,root,root) %config(noreplace) /etc/shorewall/shorewall.conf
%attr(0644,root,root) /etc/shorewall/Makefile
%attr(0544,root,root) /etc/init.d/shorewall %attr(0544,root,root) /etc/init.d/shorewall
%attr(0755,root,root) %dir /usr/share/shorewall %attr(0755,root,root) %dir /usr/share/shorewall
%attr(0700,root,root) %dir /var/lib/shorewall %attr(0700,root,root) %dir /var/lib/shorewall