On 2014-09-09 18:01, Juliusz Chroboczek wrote: > [Felix, John, we're discussing the integration of babeld (a routing daemon) > with procd. By default, babeld creates a pidfile, which can be disabled > with "-I ''" on babeld's command line. Unfortunately, it turns out that > procd is unable to pass an empty argument to babeld.] > >> There lies the rub. If you have a deployed machine on a rooftop >> somewhere, it is better to restart the daemon automagically and log the >> action rather than attempt to debug it. > > We're in full agreement here. Babeld shouldn't crash, ever. However, > should it crash, the crash should be logged somewhere and babeld restarted. > > As Gabriel mentioned, the issue is with procd being unable to pass an > empty argument. A simple workaround would be to hack babeld to interpret > "-I none" as a synonym of "-I ''", but this issue should really be fixed > in procd. If I understand the issue correctly, this patch should fix it - please test.
--- --- a/package/system/procd/files/procd.sh +++ b/package/system/procd/files/procd.sh @@ -75,7 +75,7 @@ _procd_close_service() { } _procd_add_array_data() { - while [ -n "$1" ]; do + while [ "$#" -gt 0 ]; do json_add_string "" "$1" shift done _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel