I''m attaching a few changes that are specific to Arch Linux and are motivated by our recent switch to systemd. System V init scripts are no longer used/supported on Arch Linux and, therefore, the Arch Linux init scripts can be removed from Shorewall. The two patches that follow are based against master; if it''s possible to apply them to the upcoming Shorewall 4.5.13 as well, please do that. Many thanks. ------------------------------------------------------------------------------ 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_jan
Evangelos Foutras
2013-Feb-01 16:46 UTC
[PATCH 1/2] Tweak shorewallrc.archlinux configuration
Changes:
- Remove reference to SysV init script
- Define systemd system unit directory
- Set SBINDIR to /usr/sbin
- Unset BUILD; should be auto-detected
Signed-off-by: Evangelos Foutras <evangelos@foutrelis.com>
---
Shorewall-core/shorewallrc.archlinux | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/Shorewall-core/shorewallrc.archlinux
b/Shorewall-core/shorewallrc.archlinux
index cc5d66d..bba8228 100644
--- a/Shorewall-core/shorewallrc.archlinux
+++ b/Shorewall-core/shorewallrc.archlinux
@@ -1,21 +1,21 @@
#
-# Archlinux Shorewall 4.5 rc file
+# Arch Linux Shorewall 4.5 rc file
#
-BUILD=archlinux
+BUILD= #Default is to detect the build system
HOST=archlinux
PREFIX=/usr #Top-level directory for shared files,
libraries, etc.
SHAREDIR=${PREFIX}/share #Directory for arch-neutral files.
LIBEXECDIR=${PREFIX}/share #Directory for executable scripts.
PERLLIBDIR=${PREFIX}/share/shorewall #Directory to install Shorewall Perl
module directory
CONFDIR=/etc #Directory where subsystem
configurations are installed
-SBINDIR=/sbin #Directory where system administration
programs are installed
+SBINDIR=/usr/sbin #Directory where system administration
programs are installed
MANDIR=${SHAREDIR}/man #Directory where manpages are installed.
-INITDIR=/etc/rc.d #Directory where SysV init scripts are
installed.
-INITFILE=$PRODUCT #Name of the product''s
installed SysV init script
-INITSOURCE=init.sh #Name of the distributed file to be
installed as the SysV init script
+INITDIR= #Directory where SysV init scripts are
installed.
+INITFILE= #Name of the product''s
installed SysV init script
+INITSOURCE= #Name of the distributed file to be
installed as the SysV init script
ANNOTATED= #If non-zero, annotated configuration
files are installed
SYSCONFDIR= #Directory where SysV init parameter
files are installed
-SYSTEMD= #Directory where .service files are
installed (systems running systemd only)
+SYSTEMD=/usr/lib/systemd/system #Directory where .service files are
installed (systems running systemd only)
SPARSE= #If non-empty, only install
$PRODUCT/$PRODUCT.conf in $CONFDIR
VARLIB=/var/lib #Directory where product variable data
is stored.
VARDIR=${VARLIB}/$PRODUCT #Directory where product variable data
is stored.
--
1.8.1.2
------------------------------------------------------------------------------
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_jan
Arch Linux only supports systemd now.
Signed-off-by: Evangelos Foutras <evangelos@foutrelis.com>
---
Shorewall-lite/init.archlinux.sh | 58 -------------------------------------
Shorewall/init.archlinux.sh | 60 ---------------------------------------
Shorewall6-lite/init.archlinux.sh | 58 -------------------------------------
Shorewall6/init.archlinux.sh | 60 ---------------------------------------
4 files changed, 236 deletions(-)
delete mode 100755 Shorewall-lite/init.archlinux.sh
delete mode 100755 Shorewall/init.archlinux.sh
delete mode 100755 Shorewall6-lite/init.archlinux.sh
delete mode 100755 Shorewall6/init.archlinux.sh
diff --git a/Shorewall-lite/init.archlinux.sh b/Shorewall-lite/init.archlinux.sh
deleted file mode 100755
index 8fcb9e2..0000000
--- a/Shorewall-lite/init.archlinux.sh
+++ /dev/null
@@ -1,58 +0,0 @@
-#!/bin/bash
-
-OPTIONS="-f"
-
-if [ -f /etc/sysconfig/shorewall ] ; then
- . /etc/sysconfig/shorewall
-elif [ -f /etc/default/shorewall ] ; then
- . /etc/default/shorewall
-fi
-
-# if you want to override options, do so in /etc/sysconfig/shorewall or
-# in /etc/default/shorewall --
-# i strongly encourage you use the latter, since /etc/sysconfig/ does not
exist.
-
-. /etc/rc.conf
-. /etc/rc.d/functions
-
-DAEMON_NAME="shorewall" # of course shorewall is NOT a deamon.
-
-case "$1" in
- start)
- stat_busy "Starting $DAEMON_NAME"
- /sbin/shorewall-lite $OPTIONS start &>/dev/null
- if [ $? -gt 0 ]; then
- stat_fail
- else
- add_daemon $DAEMON_NAME
- stat_done
- fi
- ;;
-
-
- stop)
- stat_busy "Stopping $DAEMON_NAME"
- /sbin/shorewall-lite stop &>/dev/null
- if [ $? -gt 0 ]; then
- stat_fail
- else
- rm_daemon $DAEMON_NAME
- stat_done
- fi
- ;;
-
- restart|reload)
- stat_busy "Restarting $DAEMON_NAME"
- /sbin/shorewall-lite restart &>/dev/null
- if [ $? -gt 0 ]; then
- stat_fail
- else
- stat_done
- fi
- ;;
-
- *)
- echo "usage: $0 {start|stop|restart}"
-esac
-exit 0
-
diff --git a/Shorewall/init.archlinux.sh b/Shorewall/init.archlinux.sh
deleted file mode 100755
index 8f2f81e..0000000
--- a/Shorewall/init.archlinux.sh
+++ /dev/null
@@ -1,60 +0,0 @@
-#!/bin/bash
-
-OPTIONS="-f"
-
-if [ -f /etc/sysconfig/shorewall ] ; then
- . /etc/sysconfig/shorewall
-elif [ -f /etc/default/shorewall ] ; then
- . /etc/default/shorewall
-fi
-
-# if you want to override options, do so in /etc/sysconfig/shorewall or
-# in /etc/default/shorewall --
-# i strongly encourage you use the latter, since /etc/sysconfig/ does not
exist.
-
-. /etc/rc.conf
-. /etc/rc.d/functions
-
-DAEMON_NAME="shorewall" # of course shorewall is NOT a deamon.
-
-export SHOREWALL_INIT_SCRIPT=1
-
-case "$1" in
- start)
- stat_busy "Starting $DAEMON_NAME"
- /sbin/shorewall $OPTIONS start &>/dev/null
- if [ $? -gt 0 ]; then
- stat_fail
- else
- add_daemon $DAEMON_NAME
- stat_done
- fi
- ;;
-
-
- stop)
- stat_busy "Stopping $DAEMON_NAME"
- /sbin/shorewall stop &>/dev/null
- if [ $? -gt 0 ]; then
- stat_fail
- else
- rm_daemon $DAEMON_NAME
- stat_done
- fi
- ;;
-
- restart|reload)
- stat_busy "Restarting $DAEMON_NAME"
- /sbin/shorewall restart &>/dev/null
- if [ $? -gt 0 ]; then
- stat_fail
- else
- stat_done
- fi
- ;;
-
- *)
- echo "usage: $0 {start|stop|restart}"
-esac
-exit 0
-
diff --git a/Shorewall6-lite/init.archlinux.sh
b/Shorewall6-lite/init.archlinux.sh
deleted file mode 100755
index d75f144..0000000
--- a/Shorewall6-lite/init.archlinux.sh
+++ /dev/null
@@ -1,58 +0,0 @@
-#!/bin/bash
-
-OPTIONS=""
-
-if [ -f /etc/sysconfig/shorewall6 ] ; then
- . /etc/sysconfig/shorewall6
-elif [ -f /etc/default/shorewall6 ] ; then
- . /etc/default/shorewall6
-fi
-
-# if you want to override options, do so in /etc/sysconfig/shorewall6 or
-# in /etc/default/shorewall6 --
-# i strongly encourage you use the latter, since /etc/sysconfig/ does not
exist.
-
-. /etc/rc.conf
-. /etc/rc.d/functions
-
-DAEMON_NAME="shorewall6" # of course shorewall6 is NOT a deamon.
-
-case "$1" in
- start)
- stat_busy "Starting $DAEMON_NAME"
- /sbin/shorewall6-lite $OPTIONS start &>/dev/null
- if [ $? -gt 0 ]; then
- stat_fail
- else
- add_daemon $DAEMON_NAME
- stat_done
- fi
- ;;
-
-
- stop)
- stat_busy "Stopping $DAEMON_NAME"
- /sbin/shorewall6-lite stop &>/dev/null
- if [ $? -gt 0 ]; then
- stat_fail
- else
- rm_daemon $DAEMON_NAME
- stat_done
- fi
- ;;
-
- restart|reload)
- stat_busy "Restarting $DAEMON_NAME"
- /sbin/shorewall6-lite restart &>/dev/null
- if [ $? -gt 0 ]; then
- stat_fail
- else
- stat_done
- fi
- ;;
-
- *)
- echo "usage: $0 {start|stop|restart}"
-esac
-exit 0
-
diff --git a/Shorewall6/init.archlinux.sh b/Shorewall6/init.archlinux.sh
deleted file mode 100755
index 6d0b36c..0000000
--- a/Shorewall6/init.archlinux.sh
+++ /dev/null
@@ -1,60 +0,0 @@
-#!/bin/bash
-
-OPTIONS="-f"
-
-if [ -f /etc/sysconfig/shorewall6 ] ; then
- . /etc/sysconfig/shorewall6
-elif [ -f /etc/default/shorewall6 ] ; then
- . /etc/default/shorewall6
-fi
-
-# if you want to override options, do so in /etc/sysconfig/shorewall6 or
-# in /etc/default/shorewall6 --
-# i strongly encourage you use the latter, since /etc/sysconfig/ does not
exist.
-
-. /etc/rc.conf
-. /etc/rc.d/functions
-
-DAEMON_NAME="shorewall6" # of course shorewall6 is NOT a deamon.
-
-export SHOREWALL_INIT_SCRIPT=1
-
-case "$1" in
- start)
- stat_busy "Starting $DAEMON_NAME"
- /sbin/shorewall6 $OPTIONS start &>/dev/null
- if [ $? -gt 0 ]; then
- stat_fail
- else
- add_daemon $DAEMON_NAME
- stat_done
- fi
- ;;
-
-
- stop)
- stat_busy "Stopping $DAEMON_NAME"
- /sbin/shorewall6 stop &>/dev/null
- if [ $? -gt 0 ]; then
- stat_fail
- else
- rm_daemon $DAEMON_NAME
- stat_done
- fi
- ;;
-
- restart|reload)
- stat_busy "Restarting $DAEMON_NAME"
- /sbin/shorewall6 restart &>/dev/null
- if [ $? -gt 0 ]; then
- stat_fail
- else
- stat_done
- fi
- ;;
-
- *)
- echo "usage: $0 {start|stop|restart}"
-esac
-exit 0
-
--
1.8.1.2
------------------------------------------------------------------------------
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_jan
On 02/01/2013 08:46 AM, Evangelos Foutras wrote:> I''m attaching a few changes that are specific to Arch Linux and are motivated > by our recent switch to systemd. > > System V init scripts are no longer used/supported on Arch Linux and, > therefore, the Arch Linux init scripts can be removed from Shorewall. > > The two patches that follow are based against master; if it''s possible to > apply them to the upcoming Shorewall 4.5.13 as well, please do that.Applied to the 4.5.13 branch. Thanks! -Tom -- Tom Eastep \ When I die, I want to go like my Grandfather who Shoreline, \ died peacefully in his sleep. Not screaming like Washington, USA \ all of the passengers in his car http://shorewall.net \________________________________________________ ------------------------------------------------------------------------------ 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_jan