diff options
author | Tyler Baker <forcedinductionz@gmail.com> | 2017-10-25 08:13:48 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-25 08:13:48 -0700 |
commit | ceb64a544ae771e2e1d1a41e46a59c6f0a9de060 (patch) | |
tree | 0e3aac8edbfd28384469190795fab4e9d07cb9ec /lava-slave/scripts | |
parent | ee8ef7b266fe45f2f2bc3ea6a8759e012b021e40 (diff) | |
parent | 26cc005179760bd25b8bdd724a936847c81d24eb (diff) |
Merge pull request #9 from montjoie/dockercompose
Dockercompose
Diffstat (limited to 'lava-slave/scripts')
-rwxr-xr-x | lava-slave/scripts/cu-loop | 11 | ||||
-rwxr-xr-x | lava-slave/scripts/start.sh | 34 | ||||
-rwxr-xr-x | lava-slave/scripts/stop.sh | 3 |
3 files changed, 48 insertions, 0 deletions
diff --git a/lava-slave/scripts/cu-loop b/lava-slave/scripts/cu-loop new file mode 100755 index 0000000..fbe5777 --- /dev/null +++ b/lava-slave/scripts/cu-loop @@ -0,0 +1,11 @@ +#!/bin/sh +DEV=$1 +BAUD=${2:-115200} + +while true; do + # NOTE: needs cu >= 1.07-24 + # c.f. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=336996 + test -e $DEV && cu -l $DEV -s $BAUD --parity=none --nostop --nortscts dir + sleep 0.2 +done + diff --git a/lava-slave/scripts/start.sh b/lava-slave/scripts/start.sh new file mode 100755 index 0000000..c9645b3 --- /dev/null +++ b/lava-slave/scripts/start.sh @@ -0,0 +1,34 @@ +#!/bin/bash +# 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 + +# FIXME lava-slave does not run if old pid is present +rm -f /var/run/lava-slave.pid +service lava-slave start || exit 5 + +if [ -e /etc/lavapdu ];then + /etc/init.d/postgresql start || exit 6 + + echo "== Start lavapdu listen ==" + /etc/init.d/lavapdu-listen start || exit 7 + # lava listen create the database, let it some time + sleep 5 + echo "== Start lavapdu runner ==" + /etc/init.d/lavapdu-runner start || exit 8 +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" + /usr/sbin/conmux $item & +done + +# start an http file server for boot/transfer_overlay support +(cd /var/lib/lava/dispatcher; python -m SimpleHTTPServer 80) diff --git a/lava-slave/scripts/stop.sh b/lava-slave/scripts/stop.sh new file mode 100755 index 0000000..0f18456 --- /dev/null +++ b/lava-slave/scripts/stop.sh @@ -0,0 +1,3 @@ +#!/bin/bash +service tftpd-hpa stop +service lava-slave stop |