Lines Matching defs:action
43 /* Allowed init action types */
53 /* A mapping between "inittab" action name strings and action type codes. */
56 int action;
74 int action;
369 if (a->action & (SYSINIT | WAIT | CTRLALTDEL | SHUTDOWN | RESTART)) {
459 if (a->action & ASKFIRST) {
527 static void run_actions(int action)
533 if (a->action == action) {
537 } else if (a->action & (SYSINIT | WAIT | CTRLALTDEL | SHUTDOWN | RESTART)) {
540 } else if (a->action & ONCE) {
543 } else if (a->action & (RESPAWN | ASKFIRST)) {
616 if (a->action & RESTART) {
696 static void new_init_action(int action, const char *command, const char *cons)
700 if (strcmp(cons, bb_dev_null) == 0 && (action & ASKFIRST))
705 /* don't enter action if it's already in the list,
710 a->action = action;
723 new_action->action = action;
725 messageD(L_LOG | L_CONSOLE, "command='%s' action=%d tty='%s'\n",
726 new_action->command, new_action->action, new_action->terminal);
729 static void delete_init_action(struct init_action *action)
734 if (a == action) {
759 char *id, *runlev, *action, *command, *eol;
812 /* Separate the runlevels from the action */
813 action = strchr(runlev, ':');
814 if (action == NULL || *(action + 1) == '\0') {
818 *action = '\0';
819 ++action;
822 /* Separate the action from the command */
823 command = strchr(action, ':');
834 if (strcmp(a->name, action) == 0) {
843 new_init_action(a->action, command, id);
848 /* Choke on an unknown action */
865 a->action = ONCE;
873 if ((a->action & (ONCE | SYSINIT | WAIT)) && a->pid == 0) {