From: Baptiste Jonglez Date: Wed, 27 Aug 2014 23:41:42 +0000 (+0200) Subject: babeld: Print an error when startup fails X-Git-Url: http://git.openwrt.org/?p=feed%2Frouting.git;a=commitdiff_plain;h=bfbcaf87e66e525ac99fb9b21ef68d8130876f9b babeld: Print an error when startup fails --- 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() {