On 8/18/2013 1:49 PM, Tom Eastep wrote:
> On 8/18/2013 11:11 AM, Thomas D. wrote:
>> Tom Eastep wrote:
>>> All of the released shorewallrc files have a SYSTEMD variable
>>
>> Yes, SYSTEMD (=SYSTEMDDIR from my first mail) exists.
>>
>> But how would I tell install.sh to install "service.gentoo" as systemd
>> service like I can tell install.sh to install "foo" as init.d script?
>>
>> And when it comes to shorewall-init, I also have the need to install an
>> additional script (see my comment here [1] and Fedoras solution for
>> iptables [2] (iptables should have the same problem like shorewall-init
>> has)). I don't think that "LIBEXECDIR" can/should be used here.
> 
> Here's a patch that implements a SERVICEFILE variable. I'm still unclear
> about the requirements described in your last paragraph above.

Correct patch:

-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 \________________________________________________
diff --git a/Shorewall-core/configure b/Shorewall-core/configure
index 2032d87..c77f3e6 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 b7d047c..23cdb44 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 d688975..e7ced90 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 bba8228..725d6db 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 de1c867..e3f4771 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 de22339..e814a8a 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 f88f361..1d7e899 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 ad827b3..2960dec 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 e5a47fa..e0dd0a8 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 da09256..47215eb 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 60baebd..fd1531f 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 00860fd..713f46d 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 cb79767..11d5b11 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
 
 #

Attachment: signature.asc
Description: OpenPGP digital signature

------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
Shorewall-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/shorewall-devel

Reply via email to