X-Git-Url: http://git.archive.openwrt.org/?a=blobdiff_plain;f=proto-shell.c;h=51a6dac17f797f0c895200607fa3ebb85402eff5;hb=6803aef644a5112f331e6de4d37d78718b76a9bf;hp=b40b456987c72744c336db4ac97b38201b127234;hpb=4ff6bcbee05983037f6a629b114beace5d98bdbe;p=project%2Fnetifd.git diff --git a/proto-shell.c b/proto-shell.c index b40b456..51a6dac 100644 --- a/proto-shell.c +++ b/proto-shell.c @@ -25,6 +25,7 @@ struct proto_shell_handler { struct proto_handler proto; struct config_param_list config; char *config_buf; + bool init_available; char script_name[]; }; @@ -615,6 +616,10 @@ proto_shell_add_handler(const char *script, json_object *obj) if (tmp && json_object_get_boolean(tmp)) handler->proto.flags |= PROTO_FLAG_NODEV; + tmp = get_field(obj, "available", json_type_boolean); + if (tmp && json_object_get_boolean(tmp)) + handler->proto.flags |= PROTO_FLAG_INIT_AVAILABLE; + config = get_field(obj, "config", json_type_array); if (config) handler->config_buf = proto_shell_parse_config(&handler->config, config);