From 5cf57190fb6bacf61581767aeee6638db892b7ff Mon Sep 17 00:00:00 2001 From: teastep Date: Mon, 6 Sep 2004 23:46:26 +0000 Subject: [PATCH] Fix shorewall.spec so that Shorewall will start up at boot git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@1606 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb --- Shorewall2/changelog.txt | 3 +++ Shorewall2/releasenotes.txt | 4 ++++ Shorewall2/shorewall.spec | 8 ++++++++ 3 files changed, 15 insertions(+) diff --git a/Shorewall2/changelog.txt b/Shorewall2/changelog.txt index 734b5438a..b3f89ee6b 100644 --- a/Shorewall2/changelog.txt +++ b/Shorewall2/changelog.txt @@ -64,3 +64,6 @@ Changes since 2.0.3 30) Verify Physdev match if BRIDGING=Yes 31) Don't NAT tunnel traffic. + +32) Fix shorewall.spec to run chkconfig/insserv after initial install. + diff --git a/Shorewall2/releasenotes.txt b/Shorewall2/releasenotes.txt index fec49a9b9..d949ae724 100755 --- a/Shorewall2/releasenotes.txt +++ b/Shorewall2/releasenotes.txt @@ -47,6 +47,10 @@ Problems corrected since 2.1.7 allows tunnel mode IPSEC to work for local networks where some of the systems use one-to-one NAT. +4) The shorewall.spec file now directs rpm to cause Shorewall to start + automatically at boot. This feature was inadvertently removed in + Shorewall 2.1.3. + ----------------------------------------------------------------------- Issues when migrating from Shorewall 2.0 to Shorewall 2.1: diff --git a/Shorewall2/shorewall.spec b/Shorewall2/shorewall.spec index 6be86cfea..e0b9b6d25 100644 --- a/Shorewall2/shorewall.spec +++ b/Shorewall2/shorewall.spec @@ -40,6 +40,14 @@ rm -rf $RPM_BUILD_ROOT %post +if [ $1 -eq 1 ]; then + if [ -x /sbin/insserv ]; then + /sbin/insserv /etc/rc.d/shorewall + elif [ -x /sbin/chkconfig ]; then + /sbin/chkconfig --add shorewall; + fi +fi + %preun if [ $1 = 0 ]; then