/[baselayout]/trunk/src/runscript.c
Gentoo

Diff of /trunk/src/runscript.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 2770 Revision 2786
571 int depoptions = RC_DEP_TRACE; 571 int depoptions = RC_DEP_TRACE;
572 572
573 rc_plugin_run (rc_hook_service_start_in, applet); 573 rc_plugin_run (rc_hook_service_start_in, applet);
574 hook_out = rc_hook_service_start_out; 574 hook_out = rc_hook_service_start_out;
575 575
576 if (rc_is_env ("RC_STRICT_DEPEND", "yes"))
577 depoptions |= RC_DEP_STRICT;
578
579 if (rc_is_env ("IN_HOTPLUG", "1") || in_background) { 576 if (rc_is_env ("IN_HOTPLUG", "1") || in_background) {
580 if (! rc_service_state (service, rc_service_inactive) && 577 if (! rc_service_state (service, rc_service_inactive) &&
581 ! rc_service_state (service, rc_service_stopped)) 578 ! rc_service_state (service, rc_service_stopped))
582 exit (EXIT_FAILURE); 579 exit (EXIT_FAILURE);
583 background = true; 580 background = true;
595 592
596 if (! rc_mark_service (service, rc_service_starting)) 593 if (! rc_mark_service (service, rc_service_starting))
597 eerrorx ("ERROR: %s has been started by something else", applet); 594 eerrorx ("ERROR: %s has been started by something else", applet);
598 595
599 make_exclusive (service); 596 make_exclusive (service);
597
598 if (rc_is_env ("RC_DEPEND_STRICT", "yes"))
599 depoptions |= RC_DEP_STRICT;
600
601 if (rc_runlevel_starting ())
602 depoptions |= RC_DEP_START;
600 603
601 if (deps) { 604 if (deps) {
602 if (! deptree && ((deptree = rc_load_deptree ()) == NULL)) 605 if (! deptree && ((deptree = rc_load_deptree ()) == NULL))
603 eerrorx ("failed to load deptree"); 606 eerrorx ("failed to load deptree");
604 607
826 if (deps || ! rc_service_state (service, rc_service_wasinactive)) { 829 if (deps || ! rc_service_state (service, rc_service_wasinactive)) {
827 int depoptions = RC_DEP_TRACE; 830 int depoptions = RC_DEP_TRACE;
828 char *svc; 831 char *svc;
829 int i; 832 int i;
830 833
831 if (rc_is_env ("RC_STRICT_DEPEND", "yes")) 834 if (rc_is_env ("RC_DEPEND_STRICT", "yes"))
832 depoptions |= RC_DEP_STRICT; 835 depoptions |= RC_DEP_STRICT;
836
837 if (rc_runlevel_stopping ())
838 depoptions |= RC_DEP_STOP;
833 839
834 if (! deptree && ((deptree = rc_load_deptree ()) == NULL)) 840 if (! deptree && ((deptree = rc_load_deptree ()) == NULL))
835 eerrorx ("failed to load deptree"); 841 eerrorx ("failed to load deptree");
836 842
837 rc_strlist_free (types); 843 rc_strlist_free (types);
1178 strcmp (optarg, "needsme") == 0 || 1184 strcmp (optarg, "needsme") == 0 ||
1179 strcmp (optarg, "usesme") == 0 || 1185 strcmp (optarg, "usesme") == 0 ||
1180 strcmp (optarg, "iafter") == 0 || 1186 strcmp (optarg, "iafter") == 0 ||
1181 strcmp (optarg, "ibefore") == 0 || 1187 strcmp (optarg, "ibefore") == 0 ||
1182 strcmp (optarg, "iprovide") == 0) { 1188 strcmp (optarg, "iprovide") == 0) {
1189 int depoptions = RC_DEP_TRACE;
1190
1191 if (rc_is_env ("RC_DEPEND_STRICT", "yes"))
1192 depoptions |= RC_DEP_STRICT;
1193
1183 if (! deptree && ((deptree = rc_load_deptree ()) == NULL)) 1194 if (! deptree && ((deptree = rc_load_deptree ()) == NULL))
1184 eerrorx ("failed to load deptree"); 1195 eerrorx ("failed to load deptree");
1185 1196
1186 rc_strlist_free (types); 1197 rc_strlist_free (types);
1187 types = rc_strlist_add (NULL, optarg); 1198 types = rc_strlist_add (NULL, optarg);
1188 rc_strlist_free (svclist); 1199 rc_strlist_free (svclist);
1189 svclist = rc_strlist_add (NULL, applet); 1200 svclist = rc_strlist_add (NULL, applet);
1190 rc_strlist_free (services); 1201 rc_strlist_free (services);
1191 services = rc_get_depends (deptree, types, svclist, softlevel, 0); 1202 services = rc_get_depends (deptree, types, svclist,
1203 softlevel, depoptions);
1192 STRLIST_FOREACH (services, svc, i) 1204 STRLIST_FOREACH (services, svc, i)
1193 printf ("%s%s", i == 1 ? "" : " ", svc); 1205 printf ("%s%s", i == 1 ? "" : " ", svc);
1194 printf ("\n"); 1206 printf ("\n");
1195 } else if (strcmp (optarg, "status") == 0) { 1207 } else if (strcmp (optarg, "status") == 0) {
1196 rc_service_state_t r = svc_status (service); 1208 rc_service_state_t r = svc_status (service);

Legend:
Removed from v.2770  
changed lines
  Added in v.2786

  ViewVC Help
Powered by ViewVC 1.1.20