mirror of
https://gitlab.com/shorewall/code.git
synced 2024-11-22 07:33:43 +01:00
Improve INITSOURCE handling in the installers
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
0a2f6c18cc
commit
a298817201
@ -182,6 +182,8 @@ for var in SHAREDIR LIBEXECDIRDIRDIR CONFDIR SBINDIR VARLIB VARDIR; do
|
||||
require $var
|
||||
done
|
||||
|
||||
[ -n "${INITFILE}" ] && require INITSOURCE && require INITDIR
|
||||
|
||||
PATH=${SBINDIR}:/bin:/usr${SBINDIR}:/usr/bin:/usr/local/bin:/usr/local${SBINDIR}
|
||||
|
||||
#
|
||||
@ -358,13 +360,14 @@ if [ -n "$DESTDIR" ]; then
|
||||
fi
|
||||
|
||||
if [ -n "$INITFILE" ]; then
|
||||
if [ -f "${INITSOURCE}" ]; then
|
||||
initfile="${DESTDIR}/${INITDIR}/${INITFILE}"
|
||||
install_file ${INITSOURCE} "$initfile" 0544
|
||||
|
||||
initfile="${DESTDIR}/${INITDIR}/${INITFILE}"
|
||||
install_file ${INITSOURCE} "$initfile" 0544
|
||||
[ "${SHAREDIR}" = /usr/share ] || eval sed -i \'s\|/usr/share/\|${SHAREDIR}/\|\' "$initfile"
|
||||
|
||||
[ "${SHAREDIR}" = /usr/share ] || eval sed -i \'s\|/usr/share/\|${SHAREDIR}/\|\' "$initfile"
|
||||
|
||||
echo "$Product init script installed in $initfile"
|
||||
echo "$Product init script installed in $initfile"
|
||||
fi
|
||||
fi
|
||||
#
|
||||
# Install the .service file
|
||||
|
@ -379,9 +379,12 @@ echo "$PRODUCT control program installed in ${DESTDIR}${SBINDIR}/$PRODUCT"
|
||||
#
|
||||
if [ -n "$INITFILE" ]; then
|
||||
if [ -f "${INITSOURCE}" ]; then
|
||||
install_file $INITSOURCE ${DESTDIR}${INITDIR}/$INITFILE 0544
|
||||
[ "${SHAREDIR}" = /usr/share ] || eval sed -i \'s\|/usr/share/\|${SHAREDIR}/\|\' ${DESTDIR}${INITDIR}/$INITFILE
|
||||
echo "$Product script installed in ${DESTDIR}${INITDIR}/$INITFILE"
|
||||
initfile="${DESTDIR}/${INITDIR}/${INITFILE}"
|
||||
install_file $INITSOURCE "$initfile" 0544
|
||||
|
||||
[ "${SHAREDIR}" = /usr/share ] || eval sed -i \'s\|/usr/share/\|${SHAREDIR}/\|\' "$initfile"
|
||||
|
||||
echo "$Product script installed in $initfile"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user