Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(100)

Side by Side Diff: libmtp.sh

Issue 2364793002: Revert "Uprev libmtp to 1.1.12" (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/libmtp@master
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « libmtp.pc ('k') | libmtp.pc.in » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #!/bin/sh
2 # Lifts a plugged in MTP device to user space and
3 # optionally runs a client program.
4 # Written by Linus Walleij 2006, based on the "usbcam"
5 # script by Nalin Dahyabhai.
6 DEVICEOWNER=root
7 DEVICEPERMS=666
8
9 # Special quirk for SuSE systems using "resmgr"
10 # (see http://rechner.lst.de/~okir/resmgr/)
11 if [ -f /sbin/resmgr ]
12 then
13 /sbin/resmgr "${ACTION}" "${DEVICE}" desktop usb
14 exit 0
15 fi
16
17 # This is for most other distributions
18 if [ "${ACTION}" = "add" ] && [ -f "${DEVICE}" ]
19 then
20 # New code, using lock files instead of copying /dev/console permissions
21 # This also works with non-gdm logins (e.g. on a virtual terminal)
22 # Idea and code from Nalin Dahyabhai <nalin@redhat.com>
23 if [ "x$DEVICEOWNER" = "xCONSOLE" ]
24 then
25 if [ -f /var/run/console/console.lock ]
26 then
27 DEVICEOWNER=`cat /var/run/console/console.lock`
28 elif [ -f /var/run/console.lock ]
29 then
30 DEVICEOWNER=`cat /var/run/console.lock`
31 elif [ -f /var/lock/console.lock ]
32 then
33 DEVICEOWNER=`cat /var/lock/console.lock`
34 else
35 DEVICEOWNER="nobody"
36 DEVICEPERMS="666"
37 fi
38 fi
39 if [ -n "$DEVICEOWNER" ]
40 then
41 chmod 0000 "${DEVICE}"
42 chown "${DEVICEOWNER}" "${DEVICE}"
43 chmod "${DEVICEPERMS}" "${DEVICE}"
44 fi
45 fi
OLDNEW
« no previous file with comments | « libmtp.pc ('k') | libmtp.pc.in » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698