diff options
author | Yongqin Liu <yongqin.liu@linaro.org> | 2016-06-03 16:57:56 +0800 |
---|---|---|
committer | Yongqin Liu <yongqin.liu@linaro.org> | 2016-06-03 17:53:14 +0800 |
commit | ba5734e39184d22916b47a37045ecbd0959bf4f6 (patch) | |
tree | 03518e31d5eaf0a2bf11765a34f245b6ff51bd03 | |
parent | 17a79a7f618c70395384b6384d7460c48f8a1e8f (diff) |
Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
-rwxr-xr-x | expect_change_pwd.sh | 17 | ||||
-rw-r--r-- | hacking-session-android-host.yaml | 7 |
2 files changed, 19 insertions, 5 deletions
diff --git a/expect_change_pwd.sh b/expect_change_pwd.sh new file mode 100755 index 0000000..451cbc3 --- /dev/null +++ b/expect_change_pwd.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# wrapper to make passwd(1) be non-interactive +# username is passed as 1st arg, passwd as 2nd + +password="$1" +if [ -z "${password}" ]; then + exit 0 +fi +sudo apt-get -y install expect +expect <<- DONE + spawn sudo passwd + expect "Enter new UNIX password:" + send "${password}\r" + expect "Retype new UNIX password: " + send "${password}\r" + expect eof +DONE diff --git a/hacking-session-android-host.yaml b/hacking-session-android-host.yaml index b603a3c..c2747c2 100644 --- a/hacking-session-android-host.yaml +++ b/hacking-session-android-host.yaml @@ -21,15 +21,12 @@ params: PUB_KEY: None GATEWAY: 10.0.0.1 IRC_SERVER: irc.freenode.net + PASSWORD: "" run: steps: + - ./expect_change_pwd.sh "${PASSWORD}" - lava-wait hacking-send-ip - - IPADDR=`awk -F '=' '{print $2}' /tmp/lava_multi_node_cache.txt` - - ADB_TRACE=1 - - export ADB_TRACE - - adb connect $IPADDR - - adb wait-for-device - ./setup_session_debian "$PUB_KEY" - export IRC_SERVER - export IRC_USER |