~thomas-voss/mtp/kick-rebuild

« back to all changes in this revision

Viewing changes to debian/mtp-server.conf

  • Committer: CI Train Bot
  • Author(s): Mathieu Trudel-Lapierre
  • Date: 2015-02-19 19:56:10 UTC
  • mfrom: (63.1.4 mtp)
  • Revision ID: ci-train-bot@canonical.com-20150219195610-58noxvt1ra616bkb
Fix startup issues on desktop: guard against android_usb not being available and don't fail with an abort when /dev/mtp_usb isn't there; just error and return. Fixes: #1421664
Approved by: Sebastien Bacher, PS Jenkins bot

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
pre-start script
7
7
    [ "$USER" != "lightdm" ] || { stop; exit 0; }
8
8
 
9
 
    if grep -qc DISCONNECTED /sys/devices/virtual/android_usb/android0/state;
 
9
    disconnected=`grep -c DISCONNECTED /sys/devices/virtual/android_usb/android0/state`;
 
10
    if [ -z "$disconnected" ] || [ "$disconnected" -ge 1 ];
10
11
    then
11
12
        stop; exit 0;
12
13
    fi