Skip to content

Commit

Permalink
initctl: let -f force-skip check for built-in service
Browse files Browse the repository at this point in the history
When calling `initctl -b create` from a start script at bootstrap you
risk blocking the boot since Finit currently cannot reply to IPC during
that period.

This patch allows -f to override this builtin check for the following
initctl commands:

 - touch
 - show
 - edit
 - create
 - delete

Signed-off-by: Joachim Wiberg <[email protected]>
  • Loading branch information
troglobit committed May 20, 2023
1 parent f4d3ec1 commit 75f61a5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/serv.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ static int is_builtin(char *arg)
{
svc_t *svc;

/* skip check, we may be in non-responsive bootstrap */
if (force)
return 0;

svc = client_svc_find(arg);
if (!svc)
return 0;
Expand Down

0 comments on commit 75f61a5

Please sign in to comment.