~pwlars/ubuntu-test-cases/auto-offline-devices

« back to all changes in this revision

Viewing changes to utils/host/reboot-and-unlock.sh

  • Committer: paul.larson at canonical
  • Date: 2014-09-25 15:12:03 UTC
  • mfrom: (302.1.1 touch)
  • Revision ID: paul.larson@canonical.com-20140925151203-f4m4a1cef077mx27
To reinstate the workaround to find the session with sudo

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
set -e
 
3
 
 
4
basedir=$(dirname $(readlink -f $0))
 
5
 
 
6
if ! adb-shell dpkg -s unity8-autopilot 2>/dev/null >/dev/null ; then
 
7
        echo "Installing unity8-autopilot as a pre-req for unlocking screen"
 
8
        adb shell sudo apt-get install -yq --force-yes unity8-autopilot
 
9
fi
 
10
 
 
11
adb pull /usr/share/unity8/unlock-device "${basedir}"
 
12
chmod +x "${basedir}/unlock-device"
 
13
 
 
14
# unlock-device will reboot for us
 
15
exec "${basedir}/unlock-device" -w $basedir/../../scripts/reboot-and-wait