Index: sysutils/fusefs-simple-mtpfs/Makefile =================================================================== --- sysutils/fusefs-simple-mtpfs/Makefile (revision 365957) +++ sysutils/fusefs-simple-mtpfs/Makefile (working copy) @@ -35,8 +35,17 @@ OPTIONS_DEFINE= DOCS CONFIGURE_ENV+= LIBUSB1_CFLAGS=" " LIBUSB1_LIBS="-lusb" .endif +.if exists(/etc/autofs) +PLIST_FILES+= /etc/autofs/special_simple-mtpfs +SUB_FILES+= special_simple-mtpfs +.endif + post-install: @${MKDIR} ${STAGEDIR}${DOCSDIR} ${INSTALL_DATA} ${PORTDOCS:C|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR} +.if exists(/etc/autofs) + ${MKDIR} ${STAGEDIR}/etc/autofs + ${INSTALL_SCRIPT} ${WRKDIR}/special_simple-mtpfs ${STAGEDIR}/etc/autofs +.endif .include Index: sysutils/fusefs-simple-mtpfs/files/special_simple-mtpfs.in =================================================================== --- sysutils/fusefs-simple-mtpfs/files/special_simple-mtpfs.in (revision 0) +++ sysutils/fusefs-simple-mtpfs/files/special_simple-mtpfs.in (working copy) @@ -0,0 +1,18 @@ +#!/bin/sh +# +# Intended for use with /etc/auto_master containing +# /mtp -simple-mtpfs -allow_other +# + +out=$(%%PREFIX%%/bin/simple-mtpfs --list-devices 2>&1) +[ $? -eq 0 ] || exit 1 + +if [ $# -eq 0 ]; then + echo "$out" | sed 's/[^:]*: //' | sort -u + exit 0 +fi + +devno=$(echo "$out" | (fgrep "$1" || echo 0) | sed 's/:.*//') +[ $devno -gt 0 ] || exit 1 + +echo "/ -fstype=none,--device=$devno,mountprog=%%PREFIX%%/bin/simple-mtpfs :none" Property changes on: sysutils/fusefs-simple-mtpfs/files/special_simple-mtpfs.in ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property