From 059045807de95e21f0b7794f322dbdfbd1af3a54 Mon Sep 17 00:00:00 2001 From: Fina Wilke Date: Sun, 17 Jul 2022 00:15:42 +0200 Subject: Add option to specify init script location Also allows to disable the installation if desired --- util/install_helper.sh | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'util/install_helper.sh') diff --git a/util/install_helper.sh b/util/install_helper.sh index cb649a7..33f4a42 100755 --- a/util/install_helper.sh +++ b/util/install_helper.sh @@ -10,6 +10,7 @@ sysconfdir="$1" bindir="$2" udevrulesdir="$3" useroot="$4" +initscriptdir="$5" # Both sysconfdir and bindir are absolute paths (since they are joined # with --prefix in meson.build), but need to be interpreted relative @@ -39,15 +40,14 @@ fi install -D -m 644 "${MESON_SOURCE_ROOT}/util/udev.rules" \ "${DESTDIR}${udevrulesdir}/99-fuse3.rules" -install -D -m 755 "${MESON_SOURCE_ROOT}/util/init_script" \ - "${DESTDIR}/etc/init.d/fuse3" +if [ "$initscriptdir" != "" ]; then + install -D -m 755 "${MESON_SOURCE_ROOT}/util/init_script" \ + "${DESTDIR}${initscriptdir}/fuse3" - -if test -x /usr/sbin/update-rc.d && test -z "${DESTDIR}"; then - /usr/sbin/update-rc.d fuse3 start 34 S . start 41 0 6 . || /bin/true -else - echo "== FURTHER ACTION REQUIRED ==" - echo "Make sure that your init system will start the ${DESTDIR}/etc/init.d/fuse3 init script" + if test -x /usr/sbin/update-rc.d && test -z "${DESTDIR}"; then + /usr/sbin/update-rc.d fuse3 start 34 S . start 41 0 6 . || /bin/true + else + echo "== FURTHER ACTION REQUIRED ==" + echo "Make sure that your init system will start the ${DESTDIR}${initscriptdir}/init.d/fuse3 init script" + fi fi - - -- cgit v1.2.3