|
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 |
if [ $# -eq 0 ]; then |
| 11 |
echo "$out" | sed 's/[^:]*: //' | sort -u |
| 12 |
exit 0 |
| 13 |
fi |
| 14 |
|
| 15 |
devnum=$(echo "$out" | (fgrep "$1" || echo 0) | sed 's/:.*//') |
| 16 |
[ $devnum -gt 0 ] || exit 1 |
| 17 |
|
| 18 |
echo "/ -fstype=nil,--device=$devnum,mountprog=%%PREFIX%%/bin/simple-mtpfs :nil" |