From 39e348997fe1af30295185d65a9a0eb9e076b239 Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Sun, 18 Aug 2013 14:27:26 -0700 Subject: [PATCH] Add SERVICEFILE variable to shoreallrc. Signed-off-by: Tom Eastep --- Shorewall-core/configure | 1 + Shorewall-core/configure.pl | 1 + Shorewall-core/shorewallrc.apple | 1 + Shorewall-core/shorewallrc.archlinux | 1 + Shorewall-core/shorewallrc.cygwin | 1 + Shorewall-core/shorewallrc.debian | 1 + Shorewall-core/shorewallrc.default | 1 + Shorewall-core/shorewallrc.redhat | 1 + Shorewall-core/shorewallrc.slackware | 1 + Shorewall-core/shorewallrc.suse | 1 + Shorewall-init/install.sh | 7 ++++--- Shorewall-lite/install.sh | 6 +++--- Shorewall/install.sh | 5 +++-- 13 files changed, 20 insertions(+), 8 deletions(-) diff --git a/Shorewall-core/configure b/Shorewall-core/configure index 2032d871f..c77f3e6fc 100755 --- a/Shorewall-core/configure +++ b/Shorewall-core/configure @@ -210,6 +210,7 @@ for on in \ AUXINITSOURCE \ AUXINITFILE \ SYSTEMD \ + SERVICEFILE \ SYSCONFFILE \ SYSCONFDIR \ SPARSE \ diff --git a/Shorewall-core/configure.pl b/Shorewall-core/configure.pl index b7d047caf..23cdb449f 100755 --- a/Shorewall-core/configure.pl +++ b/Shorewall-core/configure.pl @@ -166,6 +166,7 @@ for ( qw/ HOST AUXINITSOURCE AUXINITFILE SYSTEMD + SERVICEFILE SYSCONFFILE SYSCONFDIR SPARSE diff --git a/Shorewall-core/shorewallrc.apple b/Shorewall-core/shorewallrc.apple index d6889752b..e7ced9077 100644 --- a/Shorewall-core/shorewallrc.apple +++ b/Shorewall-core/shorewallrc.apple @@ -15,6 +15,7 @@ INITFILE= #Unused on OS X INITSOURCE= #Unused on OS X ANNOTATED= #Unused on OS X SYSTEMD= #Unused on OS X +SERVICEFILE= #Unused on OS X SYSCONFDIR= #Unused on OS X SPARSE=Yes #Only install $PRODUCT/$PRODUCT.conf in $CONFDIR. VARLIB=/var/lib #Unused on OS X diff --git a/Shorewall-core/shorewallrc.archlinux b/Shorewall-core/shorewallrc.archlinux index bba822853..725d6db9b 100644 --- a/Shorewall-core/shorewallrc.archlinux +++ b/Shorewall-core/shorewallrc.archlinux @@ -16,6 +16,7 @@ INITSOURCE= #Name of the distributed file to be insta ANNOTATED= #If non-zero, annotated configuration files are installed SYSCONFDIR= #Directory where SysV init parameter files are installed SYSTEMD=/usr/lib/systemd/system #Directory where .service files are installed (systems running systemd only) +SERVICEFILE= #Name of the file to install in $SYSTEMD. Default is $PRODUCT.service 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. diff --git a/Shorewall-core/shorewallrc.cygwin b/Shorewall-core/shorewallrc.cygwin index de1c86738..e3f477169 100644 --- a/Shorewall-core/shorewallrc.cygwin +++ b/Shorewall-core/shorewallrc.cygwin @@ -15,6 +15,7 @@ INITFILE= #Unused on Cygwin INITSOURCE= #Unused on Cygwin ANNOTATED= #Unused on Cygwin SYSTEMD= #Unused on Cygwin +SERVICEFILE= #Unused on Cygwin SYSCONFDIR= #Unused on Cygwin SPARSE=Yes #Only install $PRODUCT/$PRODUCT.conf in $CONFDIR. VARLIB=/var/lib #Unused on Cygwin diff --git a/Shorewall-core/shorewallrc.debian b/Shorewall-core/shorewallrc.debian index de223396b..e814a8a91 100644 --- a/Shorewall-core/shorewallrc.debian +++ b/Shorewall-core/shorewallrc.debian @@ -15,6 +15,7 @@ INITFILE=$PRODUCT #Name of the product's installed SysV in INITSOURCE=init.debian.sh #Name of the distributed file to be installed as the SysV init script ANNOTATED= #If non-zero, annotated configuration files are installed SYSCONFFILE=default.debian #Name of the distributed file to be installed in $SYSCONFDIR +SERVICEFILE= #Name of the file to install in $SYSTEMD. Default is $PRODUCT.service SYSCONFDIR=/etc/default #Directory where SysV init parameter files are installed SYSTEMD= #Directory where .service files are installed (systems running systemd only) SPARSE=Yes #If non-empty, only install $PRODUCT/$PRODUCT.conf in $CONFDIR diff --git a/Shorewall-core/shorewallrc.default b/Shorewall-core/shorewallrc.default index f88f3618b..1d7e89906 100644 --- a/Shorewall-core/shorewallrc.default +++ b/Shorewall-core/shorewallrc.default @@ -15,6 +15,7 @@ INITFILE=$PRODUCT #Name of the product's installed SysV in INITSOURCE=init.sh #Name of the distributed file to be installed as the SysV init script ANNOTATED= #If non-zero, annotated configuration files are installed SYSTEMD= #Directory where .service files are installed (systems running systemd only) +SERVICEFILE= #Name of the file to install in $SYSTEMD. Default is $PRODUCT.service SYSCONFFILE= #Name of the distributed file to be installed in $SYSCONFDIR SYSCONFDIR= #Directory where SysV init parameter files are installed SPARSE= #If non-empty, only install $PRODUCT/$PRODUCT.conf in $CONFDIR diff --git a/Shorewall-core/shorewallrc.redhat b/Shorewall-core/shorewallrc.redhat index ad827b3e8..2960dec4a 100644 --- a/Shorewall-core/shorewallrc.redhat +++ b/Shorewall-core/shorewallrc.redhat @@ -16,6 +16,7 @@ INITSOURCE=init.fedora.sh #Name of the distributed file to be inst ANNOTATED= #If non-zero, annotated configuration files are installed SYSTEMD=/lib/systemd/system #Directory where .service files are installed (systems running systemd only) SYSCONFFILE=sysconfig #Name of the distributed file to be installed as $SYSCONFDIR/$PRODUCT +SERVICEFILE= #Name of the file to install in $SYSTEMD. Default is $PRODUCT.service SYSCONFDIR=/etc/sysconfig/ #Directory where SysV init parameter files are installed SPARSE= #If non-empty, only install $PRODUCT/$PRODUCT.conf in $CONFDIR VARLIB=/var/lib #Directory where product variable data is stored. diff --git a/Shorewall-core/shorewallrc.slackware b/Shorewall-core/shorewallrc.slackware index e5a47fa0d..e0dd0a8ce 100644 --- a/Shorewall-core/shorewallrc.slackware +++ b/Shorewall-core/shorewallrc.slackware @@ -16,6 +16,7 @@ AUXINITFILE=rc.firewall #Name of the product's installed SysV INITSOURCE=init.slackware.$PRODUCT.sh #Name of the distributed file to be installed as a second SysV init script INITFILE=rc.$PRODUCT #Name of the product's installed second init script SYSTEMD= #Name of the directory where .service files are installed (systems running systemd only) +SERVICEFILE= #Name of the file to install in $SYSTEMD. Default is $PRODUCT.service SYSCONFFILE= #Name of the distributed file to be installed in $SYSCONFDIR SYSCONFDIR= #Name of the directory where SysV init parameter files are installed. ANNOTATED= #If non-empty, install annotated configuration files diff --git a/Shorewall-core/shorewallrc.suse b/Shorewall-core/shorewallrc.suse index da09256e4..47215ebee 100644 --- a/Shorewall-core/shorewallrc.suse +++ b/Shorewall-core/shorewallrc.suse @@ -15,6 +15,7 @@ INITFILE=$PRODUCT #Name of the product's Sys INITSOURCE=init.suse.sh #Name of the distributed file to be installed as the SysV init script ANNOTATED= #If non-zero, annotated configuration files are installed SYSTEMD= #Directory where .service files are installed (systems running systemd only) +SERVICEFILE= #Name of the file to install in $SYSTEMD. Default is $PRODUCT.service SYSCONFFILE= #Name of the distributed file to be installed in $SYSCONFDIR SYSCONFDIR=/etc/sysconfig/ #Directory where SysV init parameter files are installed SPARSE= #If non-empty, only install $PRODUCT/$PRODUCT.conf in $CONFDIR diff --git a/Shorewall-init/install.sh b/Shorewall-init/install.sh index 60baebdd9..fd1531f33 100755 --- a/Shorewall-init/install.sh +++ b/Shorewall-init/install.sh @@ -308,9 +308,10 @@ fi # if [ -n "$SYSTEMD" ]; then mkdir -p ${DESTDIR}${SYSTEMD} - run_install $OWNERSHIP -m 600 shorewall-init.service ${DESTDIR}${SYSTEMD}/shorewall-init.service - [ ${SBINDIR} != /sbin ] && eval sed -i \'s\|/sbin/\|${SBINDIR}/\|\' ${DESTDIR}${SYSTEMD}/shorewall-init.service - echo "Service file installed as ${DESTDIR}${SYSTEMD}/shorewall-init.service" + [ -z "$SERVICEFILE" ] && SERVICEFILE=$PRODUCT.service + run_install $OWNERSHIP -m 600 $SERVICEFILE ${DESTDIR}${SYSTEMD}/$PRODUCT.service + [ ${SBINDIR} != /sbin ] && eval sed -i \'s\|/sbin/\|${SBINDIR}/\|\' ${DESTDIR}${SYSTEMD}/$PRODUCT.service + echo "Service file $SERVICEFILE installed as ${DESTDIR}${SYSTEMD}/$PRODUCT.service" if [ -n "$DESTDIR" ]; then mkdir -p ${DESTDIR}${SBINDIR} chmod 755 ${DESTDIR}${SBINDIR} diff --git a/Shorewall-lite/install.sh b/Shorewall-lite/install.sh index 00860fd4a..713f46d89 100755 --- a/Shorewall-lite/install.sh +++ b/Shorewall-lite/install.sh @@ -374,11 +374,11 @@ fi # if [ -n "$SYSTEMD" ]; then mkdir -p ${DESTDIR}${SYSTEMD} - run_install $OWNERSHIP -m 600 $PRODUCT.service ${DESTDIR}/${SYSTEMD}/$PRODUCT.service + [ -z "$SERVICEFILE" ] && SERVICEFILE=$PRODUCT.service + run_install $OWNERSHIP -m 600 $SERVICEFILE ${DESTDIR}${SYSTEMD}/$PRODUCT.service [ ${SBINDIR} != /sbin ] && eval sed -i \'s\|/sbin/\|${SBINDIR}/\|\' ${DESTDIR}${SYSTEMD}/$PRODUCT.service - echo "Service file installed as ${DESTDIR}/lib/systemd/system/$PRODUCT.service" + echo "Service file $SERVICEFILE installed as ${DESTDIR}${SYSTEMD}/$PRODUCT.service" fi - # # Install the config file # diff --git a/Shorewall/install.sh b/Shorewall/install.sh index cb797670b..11d5b115c 100755 --- a/Shorewall/install.sh +++ b/Shorewall/install.sh @@ -411,9 +411,10 @@ fi # if [ -n "$SYSTEMD" ]; then mkdir -p ${DESTDIR}${SYSTEMD} - run_install $OWNERSHIP -m 600 $PRODUCT.service ${DESTDIR}${SYSTEMD}/$PRODUCT.service + [ -z "$SERVICEFILE" ] && SERVICEFILE=$PRODUCT.service + run_install $OWNERSHIP -m 600 $SERVICEFILE ${DESTDIR}${SYSTEMD}/$PRODUCT.service [ ${SBINDIR} != /sbin ] && eval sed -i \'s\|/sbin/\|${SBINDIR}/\|\' ${DESTDIR}${SYSTEMD}/$PRODUCT.service - echo "Service file installed as ${DESTDIR}${SYSTEMD}/$PRODUCT.service" + echo "Service file $SERVICEFILE installed as ${DESTDIR}${SYSTEMD}/$PRODUCT.service" fi #