From 9efb60c53a6f585c34e5bd404084329718d7e21b Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Fri, 27 Apr 2012 16:15:04 -0700 Subject: [PATCH] Move init.slackware.firewall.sh to Shorewall-core Signed-off-by: Tom Eastep --- .../init.slackware.firewall.sh | 0 Shorewall-core/install.sh | 10 ++++++++++ Shorewall-core/shorewallrc.slackware | 8 ++++---- Shorewall/install.sh | 7 ------- 4 files changed, 14 insertions(+), 11 deletions(-) rename {Shorewall => Shorewall-core}/init.slackware.firewall.sh (100%) diff --git a/Shorewall/init.slackware.firewall.sh b/Shorewall-core/init.slackware.firewall.sh similarity index 100% rename from Shorewall/init.slackware.firewall.sh rename to Shorewall-core/init.slackware.firewall.sh diff --git a/Shorewall-core/install.sh b/Shorewall-core/install.sh index ff2736863..a37de7801 100755 --- a/Shorewall-core/install.sh +++ b/Shorewall-core/install.sh @@ -307,6 +307,16 @@ chmod 755 ${DESTDIR}${SBINDIR} mkdir -p ${DESTDIR}${MANDIR} chmod 755 ${DESTDIR}${MANDIR} +if [ -n "${INITFILE}" ]; then + mkdir -p ${DESTDIR}${INITDIR} + chmod 755 ${DESTDIR}${INITDIR} + + if [ -n "$AUXINITSOURCE" -a -f "$AUXINITSOURCE" ]; then + install_file $AUXINITSOURCE ${DESTDIR}${INITDIR}/$AUXINITFILE 0544 + [ "${SHAREDIR}" = /usr/share ] || eval sed -i \'s\|/usr/share/\|${SHAREDIR}/\|\' ${DESTDIR}${INITDIR}/$AUXINITFILE + echo "$Product script installed in ${DESTDIR}${INITDIR}/$AUXINITFILE" + fi +fi # # Note: ${VARDIR} is created at run-time since it has always been # a relocatable directory on a per-product basis diff --git a/Shorewall-core/shorewallrc.slackware b/Shorewall-core/shorewallrc.slackware index 8eb4f28f7..c04e0bf12 100644 --- a/Shorewall-core/shorewallrc.slackware +++ b/Shorewall-core/shorewallrc.slackware @@ -11,10 +11,10 @@ CONFDIR=/etc #Directory where subsystem configurat SBINDIR=/sbin #Directory where system administration programs are installed MANDIR=${PREFIX}/man #Directory where manpages are installed. INITDIR=/etc/rc.d #Directory where SysV init scripts are installed. -INITSOURCE=init.slackware.firewall.sh #Name of the distributed file to be installed as the SysV init script -INITFILE=rc.firewall #Name of the product's installed SysV init script -AUXINITSOURCE=init.slackware.$PRODUCT.sh #Name of the distributed file to be installed as a second SysV init script -AUXINITFILE=rc.$PRODUCT #Name of the product's installed second init script +AUXINITSOURCE=init.slackware.firewall.sh #Name of the distributed file to be installed as the SysV init script +AUXINITFILE=rc.firewall #Name of the product's installed SysV init script +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) SYSCONFFILE= #Name of the distributed file to be installed in $SYSCONFDIR SYSCONFDIR= #Name of the directory where SysV init parameter files are installed. diff --git a/Shorewall/install.sh b/Shorewall/install.sh index d0ebba7d2..cce9a0d53 100755 --- a/Shorewall/install.sh +++ b/Shorewall/install.sh @@ -338,13 +338,6 @@ if [ -n "$INITFILE" ]; then [ "${SHAREDIR}" = /usr/share ] || eval sed -i \'s\|/usr/share/\|${SHAREDIR}/\|\' ${DESTDIR}${INITDIR}/$INITFILE echo "$Product script installed in ${DESTDIR}${INITDIR}/$INITFILE" fi - - if [ -n "${AUXINITSOURCE}" ]; then - install_file $AUXINITSOURCE ${DESTDIR}${INITDIR}/$AUXINITFILE 0544 - [ "${SHAREDIR}" = /usr/share ] || eval sed -i \'s\|/usr/share/\|${SHAREDIR}/\|\' ${DESTDIR}${INITDIR}/$AUXINITFILE - echo "$Product script installed in ${DESTDIR}${INITDIR}/$AUXINITFILE" - fi - fi #