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

Diff of /trunk/src/runscript.c

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

Revision 2768 Revision 2770
232 } 232 }
233} 233}
234 234
235static void cleanup (void) 235static void cleanup (void)
236{ 236{
237 if (! rc_in_plugin && prefix_locked) 237 if (! rc_in_plugin) {
238 if (prefix_locked)
238 unlink (PREFIX_LOCK); 239 unlink (PREFIX_LOCK);
239
240 if (hook_out) 240 if (hook_out)
241 rc_plugin_run (hook_out, applet); 241 rc_plugin_run (hook_out, applet);
242 if (restart_services)
243 start_services (restart_services);
244 }
245
242 rc_plugin_unload (); 246 rc_plugin_unload ();
243
244 if (restart_services ) {
245 start_services (restart_services);
246 rc_strlist_free (restart_services);
247 }
248
249 rc_free_deptree (deptree); 247 rc_free_deptree (deptree);
250 rc_strlist_free (services); 248 rc_strlist_free (services);
251 rc_strlist_free (types); 249 rc_strlist_free (types);
252 rc_strlist_free (svclist); 250 rc_strlist_free (svclist);
253 rc_strlist_free (providelist); 251 rc_strlist_free (providelist);
254 rc_strlist_free (need_services); 252 rc_strlist_free (need_services);
255 rc_strlist_free (use_services); 253 rc_strlist_free (use_services);
254 rc_strlist_free (restart_services);
256 rc_strlist_free (tmplist); 255 rc_strlist_free (tmplist);
257 free (ibsave); 256 free (ibsave);
258 257
259 if (! rc_in_plugin && in_control ()) { 258 if (! rc_in_plugin && in_control ()) {
260 if (rc_service_state (applet, rc_service_stopping)) { 259 if (rc_service_state (applet, rc_service_stopping)) {
714 len += 5; 713 len += 5;
715 tmp = rc_xmalloc (sizeof (char *) * len); 714 tmp = rc_xmalloc (sizeof (char *) * len);
716 p = tmp; 715 p = tmp;
717 STRLIST_FOREACH (tmplist, svc, i) { 716 STRLIST_FOREACH (tmplist, svc, i) {
718 if (i > 1) { 717 if (i > 1) {
719 if (i == n - 1) 718 if (i == n)
720 p += snprintf (p, len, " or "); 719 p += snprintf (p, len, " or ");
721 else 720 else
722 p += snprintf (p, len, ", "); 721 p += snprintf (p, len, ", ");
723 } 722 }
724 p += snprintf (p, len, "%s", svc); 723 p += snprintf (p, len, "%s", svc);
1047 tmp = NULL; 1046 tmp = NULL;
1048#endif 1047#endif
1049 1048
1050 STRLIST_FOREACH (env, p, i) 1049 STRLIST_FOREACH (env, p, i)
1051 putenv (p); 1050 putenv (p);
1052
1053 /* We don't free our list as that would be null in environ */ 1051 /* We don't free our list as that would be null in environ */
1054 } 1052 }
1055 1053
1056 softlevel = rc_get_runlevel (); 1054 softlevel = rc_get_runlevel ();
1057
1058 /* If not called from RC or another service then don't be parallel */
1059 unsetenv ("RC_PARALLEL");
1060 } 1055 }
1061 1056
1062 setenv ("RC_ELOG", service, 1); 1057 setenv ("RC_ELOG", service, 1);
1063 setenv ("SVCNAME", applet, 1); 1058 setenv ("SVCNAME", applet, 1);
1064 1059

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

  ViewVC Help
Powered by ViewVC 1.1.20