1#!/bin/sh 2# 3# Don't call this script. It is used internally by the Meson 4# build system. Thank you for your cooperation. 5# 6 7set -e 8 9sysconfdir="$1" 10bindir="$2" 11udevrulesdir="$3" 12useroot="$4" 13initscriptdir="$5" 14 15# Both sysconfdir and bindir are absolute paths (since they are joined 16# with --prefix in meson.build), but need to be interpreted relative 17# to DESTDIR (if specified). 18 19if [ -z "${DESTDIR}" ]; then 20 # Prevent warnings about uninitialized variable 21 DESTDIR="" 22else 23 # Get rid of duplicate slash 24 DESTDIR="${DESTDIR%/}" 25fi 26 27install -D -m 644 "${MESON_SOURCE_ROOT}/util/fuse.conf" \ 28 "${DESTDIR}${sysconfdir}/fuse.conf" 29 30if $useroot; then 31 chown root:root "${DESTDIR}${bindir}/fusermount3" 32 chmod u+s "${DESTDIR}${bindir}/fusermount3" 33 34 if test ! -e "${DESTDIR}/dev/fuse"; then 35 mkdir -p "${DESTDIR}/dev" 36 mknod "${DESTDIR}/dev/fuse" -m 0666 c 10 229 37 fi 38fi 39 40if [ "${udevrulesdir}" != "" ]; then 41 install -D -m 644 "${MESON_SOURCE_ROOT}/util/udev.rules" \ 42 "${DESTDIR}${udevrulesdir}/99-fuse3.rules" 43fi 44 45if [ "$initscriptdir" != "" ]; then 46 install -D -m 755 "${MESON_SOURCE_ROOT}/util/init_script" \ 47 "${DESTDIR}${initscriptdir}/fuse3" 48 49 if test -x /usr/sbin/update-rc.d && test -z "${DESTDIR}"; then 50 /usr/sbin/update-rc.d fuse3 start 34 S . start 41 0 6 . || /bin/true 51 else 52 echo "== FURTHER ACTION REQUIRED ==" 53 echo "Make sure that your init system will start the ${DESTDIR}${initscriptdir}/init.d/fuse3 init script" 54 fi 55fi 56