Install init script in $DESTDIR/etc, not $prefix/$sysconfdir
authorNikolaus Rath <Nikolaus@rath.org>
Wed, 21 Jun 2017 22:41:37 +0000 (15:41 -0700)
committerNikolaus Rath <Nikolaus@rath.org>
Wed, 21 Jun 2017 22:42:38 +0000 (15:42 -0700)
Fixes: #178.
ChangeLog.rst
util/install_helper.sh

index 285ef5af21374d775a9b2cae813a6dc3f02db771..38a1cf66fd072d4628e17bb6016887cd1165d88c 100644 (file)
@@ -1,6 +1,8 @@
 Unreleased Changes
 ==================
 
+* The init script is now installed into the right location
+  ($DESTDIR/etc/init.d rather than $prefix/$sysconfdir/init.d) 
 * The `example/passthrough_ll` filesystem now supports creating
   and writing to files.
 * `fuse_main()` / `fuse_remove_signal_handlers()`: do not reset
index fe65c1c4b9cad9b8cb8c4fd9034f72c6bc2a70f3..9b53530e15c2895d992e48bb4c3a8d307566ee88 100755 (executable)
@@ -22,11 +22,13 @@ install -D -m 644 "${MESON_SOURCE_ROOT}/util/udev.rules" \
         "${prefix}/lib/udev/rules.d/99-fuse3.rules"
 
 install -D -m 755 "${MESON_SOURCE_ROOT}/util/init_script" \
-        "${prefix}/${sysconfdir}/init.d/fuse3"
+        "${DESTDIR}/etc/init.d/fuse3"
 
-if test -x /usr/sbin/update-rc.d; then
-    # May fail for a DESTDIR installation
+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"
 fi