summaryrefslogtreecommitdiffstats
path: root/lava-slave
diff options
context:
space:
mode:
Diffstat (limited to 'lava-slave')
-rw-r--r--lava-slave/Dockerfile8
-rw-r--r--lava-slave/lava-screen.conf0
-rwxr-xr-xlava-slave/scripts/start.sh16
-rw-r--r--lava-slave/ser2net.conf0
4 files changed, 24 insertions, 0 deletions
diff --git a/lava-slave/Dockerfile b/lava-slave/Dockerfile
index b7252ef..a5b0148 100644
--- a/lava-slave/Dockerfile
+++ b/lava-slave/Dockerfile
@@ -53,6 +53,9 @@ RUN apt-get update
RUN DEBIAN_FRONTEND=noninteractive apt-get -y install cu
RUN rm /etc/apt/sources.list.d/testing.list
+RUN apt-get -y install ser2net
+COPY ser2net.conf /etc
+
COPY scripts/lava-slave /etc/init.d/
RUN chmod 755 /etc/init.d/lava-slave
@@ -78,6 +81,11 @@ COPY devices/ /root/devices/
COPY scripts/extra_actions /root/
RUN if [ -x /root/extra_actions ] ; then /root/extra_actions ; fi
+RUN apt-get -y install screen openssh-server
+RUN ssh-keygen -q -f /root/.ssh/id_rsa
+RUN cat /root/.ssh/id_rsa.pub > /root/.ssh/authorized_keys
+COPY lava-screen.conf /root/
+
EXPOSE 69/udp 80
CMD /start.sh
diff --git a/lava-slave/lava-screen.conf b/lava-slave/lava-screen.conf
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/lava-slave/lava-screen.conf
diff --git a/lava-slave/scripts/start.sh b/lava-slave/scripts/start.sh
index 35e58a4..21b6903 100755
--- a/lava-slave/scripts/start.sh
+++ b/lava-slave/scripts/start.sh
@@ -8,6 +8,9 @@ if [[ -n "$LAVA_MASTER" ]]; then
fi
service tftpd-hpa start || exit 4
+if [ -s /etc/ser2net.conf ];then
+ service ser2net start || exit 7
+fi
touch /var/run/conmux-registry
/usr/sbin/conmux-registry 63000 /var/run/conmux-registry&
@@ -20,6 +23,19 @@ do
/usr/sbin/conmux $item &
done
+HAVE_SCREEN=0
+while read screenboard
+do
+ echo "Start screen for $screenboard"
+ TERM=xterm screen -d -m -S $screenboard /dev/$screenboard 115200 -ixoff -ixon || exit 9
+ HAVE_SCREEN=1
+done < /root/lava-screen.conf
+if [ $HAVE_SCREEN -eq 1 ];then
+ sed -i 's,UsePAM.*yes,UsePAM no,' /etc/ssh/sshd_config || exit 10
+ service ssh start || exit 11
+fi
+
+
# start an http file server for boot/transfer_overlay support
(cd /var/lib/lava/dispatcher; python -m SimpleHTTPServer 80) &
diff --git a/lava-slave/ser2net.conf b/lava-slave/ser2net.conf
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/lava-slave/ser2net.conf