mirror of
https://github.com/kernelkit/infix.git
synced 2026-07-30 04:33:00 +02:00
confd: background factory reset to allow time to respond to RPC
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
committed by
Mattias Walström
parent
37506bcdd9
commit
310563abda
@@ -6,8 +6,14 @@ static int factory_reset(sr_session_ctx_t *session, uint32_t sub_id, const char
|
||||
const sr_val_t *input, const size_t input_cnt, sr_event_t event,
|
||||
unsigned request_id, sr_val_t **output, size_t *output_cnt, void *priv)
|
||||
{
|
||||
char *args[] = { "factory", "-y", NULL };
|
||||
|
||||
DEBUG("%s", xpath);
|
||||
return systemf("factory -y");
|
||||
|
||||
if (runbg(args, 500) == -1)
|
||||
return SR_ERR_INTERNAL;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ietf_factory_default_init(struct confd *confd)
|
||||
|
||||
Reference in New Issue
Block a user