diff options
author | khilman <khilman@users.noreply.github.com> | 2018-07-27 08:18:39 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-27 08:18:39 -0500 |
commit | d733f2d4280959fed968d1589580f46460ecba27 (patch) | |
tree | b91d7de9ed99bf3430854198f1dbc7c2dbfefafb /lava-slave-base/scripts/start.sh | |
parent | baf680990ecb539cde0a16ef5b32a7321dd4538a (diff) | |
parent | fd42a55a19f6fa32efb5893f5fb43f86de9b3e2d (diff) |
Merge pull request #34 from montjoie/splitimage
Splitimage
Diffstat (limited to 'lava-slave-base/scripts/start.sh')
-rwxr-xr-x | lava-slave-base/scripts/start.sh | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/lava-slave-base/scripts/start.sh b/lava-slave-base/scripts/start.sh new file mode 100755 index 0000000..21b6903 --- /dev/null +++ b/lava-slave-base/scripts/start.sh @@ -0,0 +1,46 @@ +#!/bin/bash + +/setup.sh || exit $? + +# Set LAVA Master IP +if [[ -n "$LAVA_MASTER" ]]; then + sed -i -e "s/{LAVA_MASTER}/$LAVA_MASTER/g" /etc/lava-dispatcher/lava-slave +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& +sleep 2 +for item in $(ls /etc/conmux/*cf) +do + echo "Add $item" + # On some OS, the rights/user from host are not duplicated on guest + grep -o '/dev/[a-zA-Z0-9_-]*' $item | xargs chown uucp + /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) & + +# FIXME lava-slave does not run if old pid is present +rm -f /var/run/lava-slave.pid +service lava-slave start || exit 5 + +sleep 3650d |