From b6e98169fd4a018dcb58db0cb4a3587b2f8e57f4 Mon Sep 17 00:00:00 2001 From: Christof Schulze Date: Tue, 27 Dec 2022 23:47:33 +0100 Subject: [PATCH] gluon-mmfd: add missing waitforsocket function (#2735) Fixes #2732 --- package/gluon-mmfd/files/etc/init.d/mmfd | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/package/gluon-mmfd/files/etc/init.d/mmfd b/package/gluon-mmfd/files/etc/init.d/mmfd index 4307c7e7..c6d6f1d6 100755 --- a/package/gluon-mmfd/files/etc/init.d/mmfd +++ b/package/gluon-mmfd/files/etc/init.d/mmfd @@ -5,6 +5,15 @@ START=50 DAEMON=/usr/sbin/mmfd SOCKET=/var/run/mmfd.sock +waitforsocket() { + while ! echo "get_neighbours" | uc $SOCKET + do + sleep 1 + echo "waiting for successful socket connection for mmfd" + done +} + + start_service() { local interfaces=$(for dev in $(gluon-list-mesh-interfaces); do echo " -i $dev"; done)