~cyphermox/mtp/books

« back to all changes in this revision

Viewing changes to debian/mtp-server.mtp-server-bootup.upstart

  • Committer: Mathieu Trudel-Lapierre
  • Date: 2013-09-06 19:43:56 UTC
  • Revision ID: mathieu-tl@ubuntu.com-20130906194356-m1o9620mr15l7hcd
Port to boost; expose all files in /home

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
description "MTP protocol server bootup"
 
2
 
 
3
start on local-filesystems
 
4
 
 
5
task
 
6
 
 
7
script
 
8
        timeout=10
 
9
        # loop 10 times and then exit, if the property service
 
10
        # isnt up after 80 sec # it is likely not starting at all
 
11
        while [ ! -e /dev/socket/property_service ]; do
 
12
                sleep 8
 
13
                if [ "$timeout" -le 0 ]; then
 
14
                        stop
 
15
                        exit 0
 
16
                fi
 
17
                timeout=$(($timeout - 1))
 
18
        done
 
19
 
 
20
        if [ -x /usr/bin/setprop ]; then
 
21
                /usr/bin/setprop sys.usb.config mtp,adb
 
22
        fi
 
23
 
 
24
        start mtp-server
 
25
end script