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/?a=commitdiff_plain;h=84422673a43b1f166b8d913163f9f4a6d1b12040;p=feed%2Frouting.git 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() {