diff options
author | Neil Williams <neil.williams@linaro.org> | 2014-07-18 11:13:20 +0100 |
---|---|---|
committer | Neil Williams <neil.williams@linaro.org> | 2014-07-22 12:03:03 +0100 |
commit | 2fc1bdc7a06b355a244191c6a4508f5b8710c50b (patch) | |
tree | 82e441fa0583e5aff4baa229c17159023a3b617a | |
parent | 1b8efa4ff108b20bcded0f01499b54d19b44853c (diff) |
Only output the ssh command to IRC
The hostname part is confusing and putting
the ssh command on one line is easier to
copy and paste.
Strip trailing spaces.
Change-Id: Iddb1d81ac9b37a47e6282282feeddf94e2f06c45
-rw-r--r-- | README.rst | 28 | ||||
-rwxr-xr-x | invoke_session_debian | 11 |
2 files changed, 24 insertions, 15 deletions
@@ -8,15 +8,23 @@ Assumptions Parameters ========== - * GATEWAY - The gateway for the network the target device is on (check with your LAVA admins) + * GATEWAY - The gateway for the network the target device is on + (check with your LAVA admins) * PUB_KEY - A plain-text string containing the ssh public key(s) you wish to use to connect to the device over ssh * IRC_NICK - An IRC nickname to notify when ready (Debian only) * IRC_SERVER - The IRC server to use (Debian only) * testdef - The test definition (distrbution specific) - * **hacking-session-debian.yaml** - run the hacking session on a Debian or Ubuntu filesystem, *openssh-server will be installed using the package manager* - * **hacking-session-oe.yaml** - run the hacking session on an Open Embedded filesystem *openssh-server must be installed in the image* - * **hacking-session-android.yaml** - run the hacking session on an Android filesystem *openssh-server must be installed in the image* + * **hacking-session-debian.yaml** - run the hacking session on a Debian + or Ubuntu filesystem, *openssh-server will be installed using the + package manager* + GATEWAY can be left empty for Debian hacking sessions to let the + device identify the default gateway. + IRC_SERVER defaults to irc.freenode.net + * **hacking-session-oe.yaml** - run the hacking session on an Open + Embedded filesystem *openssh-server must be installed in the image* + * **hacking-session-android.yaml** - run the hacking session on an + Android filesystem *openssh-server must be installed in the image* Starting a Hacking Session ========================== @@ -39,13 +47,13 @@ Starting a Hacking Session } ], "timeout": 3600 - } + } } Connecting to a Hacking Session =============================== The hacking session test definition will report the commands to ssh within the -LAVA log file. To access the log file, you can use a web browser; navigate to +LAVA log file. To access the log file, you can use a web browser; navigate to your hacking session and scroll to the end of the job to see instructions * This hack session was executed on Linaro's LAVA system, job ID: 116632 @@ -54,7 +62,7 @@ your hacking session and scroll to the end of the job to see instructions SSH tunneling ------------- -If your target device is located on a remote server, as is the case when +If your target device is located on a remote server, as is the case when accessing the Linaro LAVA lab, you'll want to tunnel onto the Linaro network to the device under test @@ -75,8 +83,8 @@ lava-test-shell helper functions can be found within target in the directory /la Record text to the LAVA log --------------------------- -During a hacking session, LAVA is listening to /dev/ttyS0 for the duration of -the hacking session. From within the target any text you echo to /dev/ttyS0 +During a hacking session, LAVA is listening to /dev/ttyS0 for the duration of +the hacking session. From within the target any text you echo to /dev/ttyS0 will be recorded within LAVA * From within the Test session @@ -89,7 +97,7 @@ will be recorded within LAVA Stopping a Hacking Session ========================== -During a hacking session, the target your are connected to can't be used for +During a hacking session, the target your are connected to can't be used for other tasks, to complete your session * Cancel the job in the LAVA dashboard diff --git a/invoke_session_debian b/invoke_session_debian index b20fe7b..ba711a1 100755 --- a/invoke_session_debian +++ b/invoke_session_debian @@ -7,7 +7,7 @@ if [ -z "$1" ]; then else gateway=$1 fi - + echo "Target's Gateway: $gateway" if ! grep 'invoke_session' /etc/rc.local @@ -29,18 +29,19 @@ else REAL_USER=${SUDO_USER} fi -SSH_COMMAND="ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ${REAL_USER}@${ip_addr} (${hostname})" +SSH_COMMAND="ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ${REAL_USER}@${ip_addr}" echo "*******************************************************************************************************" -echo "Please connect to: ${SSH_COMMAND}" +echo "Please connect to: ${SSH_COMMAND} for access to (${hostname})" echo "*******************************************************************************************************" echo "" if [ ! -z "${IRC_USER}" -a -e /usr/share/doc/python-irc/examples/irccat2.py ]; then # make a unique user cat <<EOF | python /usr/share/doc/python-irc/examples/irccat2.py ${IRC_SERVER} hs-${RANDOM} ${IRC_USER} Your hacking session is now ready -Please connect to: ${SSH_COMMAND}" +Please connect to: +${SSH_COMMAND}" EOF -fi +fi echo "" mkdir -p /run mkdir -p /run/hacking |