forked from extern/shorewall_code
Don't install SysV init script if systemd is specified.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
c252005e25
commit
37a3dbb6f6
@ -216,9 +216,11 @@ fi
|
|||||||
if [ -z "$DESTDIR" ]; then
|
if [ -z "$DESTDIR" ]; then
|
||||||
if [ -f /lib/systemd/system ]; then
|
if [ -f /lib/systemd/system ]; then
|
||||||
SYSTEMD=Yes
|
SYSTEMD=Yes
|
||||||
|
INITFILE=
|
||||||
fi
|
fi
|
||||||
elif [ -n "$SYSTEMD" ]; then
|
elif [ -n "$SYSTEMD" ]; then
|
||||||
mkdir -p ${DESTDIR}/lib/systemd/system
|
mkdir -p ${DESTDIR}/lib/systemd/system
|
||||||
|
INITFILE=
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -237,6 +239,7 @@ else
|
|||||||
first_install="Yes"
|
first_install="Yes"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -n "$INITFILE" ]; then
|
||||||
#
|
#
|
||||||
# Install the Init Script
|
# Install the Init Script
|
||||||
#
|
#
|
||||||
@ -253,6 +256,7 @@ case $TARGET in
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
echo "$Product script installed in ${DESTDIR}${INITDIR}/${INITFILE}"
|
echo "$Product script installed in ${DESTDIR}${INITDIR}/${INITFILE}"
|
||||||
|
fi
|
||||||
#
|
#
|
||||||
# Install the .service file
|
# Install the .service file
|
||||||
#
|
#
|
||||||
|
@ -240,6 +240,7 @@ if [ -n "$DESTDIR" ]; then
|
|||||||
|
|
||||||
if [ -n "$SYSTEMD" ]; then
|
if [ -n "$SYSTEMD" ]; then
|
||||||
mkdir -p ${DESTDIR}/lib/systemd/system
|
mkdir -p ${DESTDIR}/lib/systemd/system
|
||||||
|
INITFILE=
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
if [ ! -f /usr/share/shorewall/coreversion ]; then
|
if [ ! -f /usr/share/shorewall/coreversion ]; then
|
||||||
@ -249,6 +250,7 @@ else
|
|||||||
|
|
||||||
if [ -f /lib/systemd/system ]; then
|
if [ -f /lib/systemd/system ]; then
|
||||||
SYSTEMD=Yes
|
SYSTEMD=Yes
|
||||||
|
INITFILE=
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -305,6 +307,7 @@ if [ -n "$DESTDIR" ]; then
|
|||||||
chmod 755 ${DESTDIR}${INITDIR}
|
chmod 755 ${DESTDIR}${INITDIR}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -n "$INITFILE" ]; then
|
||||||
case $TARGET in
|
case $TARGET in
|
||||||
debian)
|
debian)
|
||||||
install_file init.debian.sh ${DESTDIR}${INITDIR}/${INITFILE} 0544
|
install_file init.debian.sh ${DESTDIR}${INITDIR}/${INITFILE} 0544
|
||||||
@ -320,8 +323,8 @@ case $TARGET in
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
echo "$Product script installed in ${DESTDIR}${INITDIR}/${INITFILE}"
|
echo "$Product init script installed in ${DESTDIR}${INITDIR}/${INITFILE}"
|
||||||
|
fi
|
||||||
#
|
#
|
||||||
# Install the .service file
|
# Install the .service file
|
||||||
#
|
#
|
||||||
|
@ -310,10 +310,12 @@ fi
|
|||||||
if [ -z "$DESTDIR" ]; then
|
if [ -z "$DESTDIR" ]; then
|
||||||
if [ -f /lib/systemd/system ]; then
|
if [ -f /lib/systemd/system ]; then
|
||||||
SYSTEMD=Yes
|
SYSTEMD=Yes
|
||||||
|
INITFILE=
|
||||||
fi
|
fi
|
||||||
elif [ -n "$SYSTEMD" ]; then
|
elif [ -n "$SYSTEMD" ]; then
|
||||||
mkdir -p ${DESTDIR}/lib/systemd/system
|
mkdir -p ${DESTDIR}/lib/systemd/system
|
||||||
fi
|
INITFILE=
|
||||||
|
fI
|
||||||
|
|
||||||
echo "Installing $Product Version $VERSION"
|
echo "Installing $Product Version $VERSION"
|
||||||
|
|
||||||
@ -342,6 +344,7 @@ fi
|
|||||||
#
|
#
|
||||||
# Install the Firewall Script
|
# Install the Firewall Script
|
||||||
#
|
#
|
||||||
|
if [ -n "$INITFILE" ]; then
|
||||||
case $HOST in
|
case $HOST in
|
||||||
debian)
|
debian)
|
||||||
install_file init.debian.sh ${DESTDIR}${INITDIR}/${INITFILE} 0544
|
install_file init.debian.sh ${DESTDIR}${INITDIR}/${INITFILE} 0544
|
||||||
@ -356,13 +359,12 @@ case $HOST in
|
|||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
if [ -n "$INITFILE" ]; then
|
|
||||||
install_file init.sh ${DESTDIR}${INITDIR}/$INITFILE 0544
|
install_file init.sh ${DESTDIR}${INITDIR}/$INITFILE 0544
|
||||||
fi
|
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
[ -n "$INITFILE" ] && echo "$Product script installed in ${DESTDIR}${INITDIR}/$INITFILE"
|
echo "$Product script installed in ${DESTDIR}${INITDIR}/$INITFILE"
|
||||||
|
fi
|
||||||
|
|
||||||
#
|
#
|
||||||
# Create /etc/$PRODUCT and /var/lib/$PRODUCT if needed
|
# Create /etc/$PRODUCT and /var/lib/$PRODUCT if needed
|
||||||
|
Loading…
Reference in New Issue
Block a user