Skip to content

Commit

Permalink
init: Add a "starting" state for services
Browse files Browse the repository at this point in the history
 * We might want to trigger something before actually execing the
   service in question in order to do some pre-flight tasks.

 * This lets you do the following:

   on property:init.svc.awesomed=starting
     write /sys/module/awesomemod/parameters/everything_is_awesome 1

   ..and when awesomed starts, it will run this trigger before forking.

Change-Id: I9756b46eafd884d367fe8304b859de2152bdfeb4
  • Loading branch information
Steve Kondik committed Jul 24, 2015
1 parent 58e24e4 commit 4988584
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions init/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,9 @@ void service_start(struct service *svc, const char *dynamic_args)

NOTICE("starting '%s'\n", svc->name);

if (properties_inited())
notify_service_state(svc->name, "starting");

pid = fork();

if (pid == 0) {
Expand Down

0 comments on commit 4988584

Please sign in to comment.