ssh-add ~/.ssh/id_ritest
rm $TMPFILE
+kill_ssh_agent() {
+ if [ "$SSH_AGENT_PID" != "" ] ; then
+ kill $SSH_AGENT_PID
+ fi
+}
+
+#
+# trap failures
+#
+trap kill_ssh_agent INT TERM EXIT ERR KILL STOP ABRT
+
#
# temp. until fabian has fixed liveboot
#
#ssh -t -A $CORE_ROUTER "cd /opt/autotest ; ./run-compile.sh --config config-jenkins.xml"
ssh -t -A $CORE_ROUTER "cd /opt/autotest ; ./run-compile.sh"
-
+#
+# remove trap
+#
+trap - INT TERM EXIT ERR KILL STOP ABRT
+kill_ssh_agent
figlet $TARGET_HOST
echo "successfully installed"
+
#
# prepare ssh
#
ssh-add ~/.ssh/id_ritest
rm $TMPFILE
+kill_ssh_agent() {
+ if [ "$SSH_AGENT_PID" != "" ] ; then
+ kill $SSH_AGENT_PID
+ fi
+}
+
+#
+# trap failures
+#
+trap kill_ssh_agent INT TERM EXIT ERR KILL STOP ABRT
+
+#
+# check system
+#
ssh -t $TARGET_HOST uname -a
echo
ssh -t $TARGET_HOST "dpkg -l | egrep '(profit|bird|vcb|ofed|qemu|kvm)' | sort -k 50"
echo
ssh -t $TARGET_HOST "cat /etc/apt/sources.list.d/* /etc/apt/sources.list|grep -v ^#|sort -u"
+#
+# remove trap
+#
+trap - INT TERM EXIT ERR KILL STOP ABRT
+kill_ssh_agent
+