summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFina Wilke <code@felinira.net>2022-07-17 00:15:42 +0200
committerNikolaus Rath <Nikolaus@rath.org>2022-09-08 10:50:53 +0100
commit059045807de95e21f0b7794f322dbdfbd1af3a54 (patch)
tree1dc2365a97ebc7cd4ef6b0e6a95ac7edeb0c6b9e
parent9e1601add411511c94527f6f7f6f071729b0c52c (diff)
downloadfuse-059045807de95e21f0b7794f322dbdfbd1af3a54.tar.gz
Add option to specify init script location
Also allows to disable the installation if desired
-rw-r--r--meson_options.txt3
-rwxr-xr-xutil/install_helper.sh20
-rw-r--r--util/meson.build5
3 files changed, 15 insertions, 13 deletions
diff --git a/meson_options.txt b/meson_options.txt
index 43304d1..891ccdf 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -4,6 +4,9 @@ option('disable-mtab', type : 'boolean', value : false,
option('udevrulesdir', type : 'string', value : '',
description: 'Where to install udev rules (if empty, query pkg-config(1))')
+option('initscriptdir', type : 'string', value : '/etc/init.d/',
+ description: 'Init script installation location (if empty, disable init script installation)')
+
option('utils', type : 'boolean', value : true,
description: 'Whether or not to build and install helper programs')
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
-
-
diff --git a/util/meson.build b/util/meson.build
index 7846870..12028d5 100644
--- a/util/meson.build
+++ b/util/meson.build
@@ -24,6 +24,5 @@ meson.add_install_script('install_helper.sh',
join_paths(get_option('prefix'), get_option('sysconfdir')),
join_paths(get_option('prefix'), get_option('bindir')),
udevrulesdir,
- '@0@'.format(get_option('useroot')))
-
-
+ '@0@'.format(get_option('useroot')),
+ get_option('initscriptdir'))