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

Diff of /trunk/src/librc.c

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

Revision 2976 Revision 2977
376 dir = rc_strcatpaths (RC_SVCDIR, "daemons", base, (char *) NULL); 376 dir = rc_strcatpaths (RC_SVCDIR, "daemons", base, (char *) NULL);
377 if (rc_is_dir (dir)) 377 if (rc_is_dir (dir))
378 rc_rm_dir (dir, true); 378 rc_rm_dir (dir, true);
379 free (dir); 379 free (dir);
380 380
381 rc_schedule_clear (service); 381 rc_service_schedule_clear (service);
382 } 382 }
383 383
384 /* These are final states, so remove us from scheduled */ 384 /* These are final states, so remove us from scheduled */
385 if (state == RC_SERVICE_STARTED || state == RC_SERVICE_STOPPED) { 385 if (state == RC_SERVICE_STARTED || state == RC_SERVICE_STOPPED) {
386 char *sdir = rc_strcatpaths (RC_SVCDIR, "scheduled", (char *) NULL); 386 char *sdir = rc_strcatpaths (RC_SVCDIR, "scheduled", (char *) NULL);
564 564
565 return (_exec_service (service, "start")); 565 return (_exec_service (service, "start"));
566} 566}
567librc_hidden_def(rc_service_start) 567librc_hidden_def(rc_service_start)
568 568
569bool rc_schedule_start_service (const char *service, 569bool rc_service_schedule_start (const char *service,
570 const char *service_to_start) 570 const char *service_to_start)
571{ 571{
572 char *dir; 572 char *dir;
573 char *init; 573 char *init;
574 char *file; 574 char *file;
598 free (file); 598 free (file);
599 free (dir); 599 free (dir);
600 600
601 return (retval); 601 return (retval);
602} 602}
603librc_hidden_def(rc_schedule_start_service) 603librc_hidden_def(rc_service_schedule_start)
604 604
605void rc_schedule_clear (const char *service) 605void rc_service_schedule_clear (const char *service)
606{ 606{
607 char *svc = rc_xstrdup (service); 607 char *svc = rc_xstrdup (service);
608 char *dir = rc_strcatpaths (RC_SVCDIR, "scheduled", basename (svc), 608 char *dir = rc_strcatpaths (RC_SVCDIR, "scheduled", basename (svc),
609 (char *) NULL); 609 (char *) NULL);
610 610
611 free (svc); 611 free (svc);
612 if (rc_is_dir (dir)) 612 if (rc_is_dir (dir))
613 rc_rm_dir (dir, true); 613 rc_rm_dir (dir, true);
614 free (dir); 614 free (dir);
615} 615}
616librc_hidden_def(rc_schedule_clear) 616librc_hidden_def(rc_service_schedule_clear)
617 617
618bool rc_service_wait (const char *service) 618bool rc_service_wait (const char *service)
619{ 619{
620 char *svc; 620 char *svc;
621 char *base; 621 char *base;

Legend:
Removed from v.2976  
changed lines
  Added in v.2977

  ViewVC Help
Powered by ViewVC 1.1.20