View | Details | Raw Unified | Return to bug 192851 | Differences between
and this patch

Collapse All | Expand All

(-)sysutils/simple-mtpfs/Makefile (+9 lines)
Lines 31-34 PLIST_FILES= bin/${PORTNAME} \ Link Here
31
CONFIGURE_ENV+=	LIBUSB1_CFLAGS=" " LIBUSB1_LIBS="-lusb"
31
CONFIGURE_ENV+=	LIBUSB1_CFLAGS=" " LIBUSB1_LIBS="-lusb"
32
.endif
32
.endif
33
33
34
.if exists(/etc/autofs)
35
PLIST_FILES+=	/etc/autofs/special_simple-mtpfs
36
SUB_FILES+=	special_simple-mtpfs
37
38
post-install:
39
	${MKDIR} ${STAGEDIR}/etc/autofs
40
	${INSTALL_SCRIPT} ${WRKDIR}/special_simple-mtpfs ${STAGEDIR}/etc/autofs
41
.endif
42
34
.include <bsd.port.mk>
43
.include <bsd.port.mk>
(-)sysutils/simple-mtpfs/files/special_simple-mtpfs.in (+21 lines)
Added Link Here
1
#!/bin/sh
2
#
3
# Intended for use with /etc/auto_master containing
4
# /mtp		-simple-mtpfs	-allow_other
5
#
6
7
out=$(%%PREFIX%%/bin/simple-mtpfs --list-devices 2>&1)
8
[ $? -eq 0 ] || exit 1
9
10
# replace disallowed characters (see usr.sbin/autofs/token.l)
11
out=$(echo "$out" | sed 's/: /:/; y/ #/_+/' | sort -u)
12
13
if [ $# -eq 0 ]; then
14
	echo "$out" | sed 's/[^:]*://' | sort -u
15
	exit 0
16
fi
17
18
devno=$(echo "$out" | (fgrep "$1" || echo 0) | sed 's/:.*//')
19
[ $devno -gt 0 ] || exit 1
20
21
echo "/ -fstype=none,--device=$devno,mountprog=%%PREFIX%%/bin/simple-mtpfs :none"

Return to bug 192851