Commit f7dd8e44 authored by Alessandro Rubini's avatar Alessandro Rubini

userspace: fix start-daemons.sh for ppsi

THe previous version of the file was not working, both because
of a typo and because ppsi currently fails if wrsh_hal is not
ready.  This adds a polling loop to wait for the mini-rpc socket to
be available.
Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent a339fb9a
......@@ -12,11 +12,18 @@ if [ -x $WR_HOME/bin/ptpd ]; then
$WR_HOME/bin/ptpd -A -c >& /dev/null &
exit 0
fi
if [ -x $WR_HOME/bin/ppsi ]; then
$WR_HOME/bin/pppsi >& /dev/kmsg &
exit 0
if [ ! -x $WR_HOME/bin/ppsi ]; then
echo "No WR-PTP daemon found" >&2
exit 1
fi
echo "No WR-PTP dameon found" >&2
exit 1
# Fire ppsi. Unfortinately the hal takes a while to start, and
# until ppsi waits by itself (not in this submodule commit, yet),
# wait here... This is the last script of the wr startup, and it can wait
for i in $(seq 1 10); do
if [ -S /tmp/.minipc/wrsw_hal ]; then break; fi
sleep 1
done
$WR_HOME/bin/ppsi >& /dev/kmsg &
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment