From bfbcaf87e66e525ac99fb9b21ef68d8130876f9b Mon Sep 17 00:00:00 2001 From: Baptiste Jonglez Date: Thu, 28 Aug 2014 01:41:42 +0200 Subject: [PATCH] babeld: Print an error when startup fails --- babeld/files/babeld.init | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/babeld/files/babeld.init b/babeld/files/babeld.init index ae45b03..65cd1ce 100755 --- a/babeld/files/babeld.init +++ b/babeld/files/babeld.init @@ -132,6 +132,12 @@ start() { config_foreach babel_filter filter # Using multiple config files is supported since babeld 1.5.1 /usr/sbin/babeld -D -I "$pidfile" -c "$OTHERCONFIGFILE" -c "$CONFIGFILE" + # Wait for the pidfile to appear + for i in 1 2 + do + [ -f "$pidfile" ] || sleep 1 + done + [ -f "$pidfile" ] || (echo "Failed to start babeld"; exit 42) } stop() { -- 2.30.2