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

Diff of /trunk/src/rc.c

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

Revision 2650 Revision 2652
386 execl ("/sbin/halt", "/sbin/halt", "-f", (char *) NULL); 386 execl ("/sbin/halt", "/sbin/halt", "-f", (char *) NULL);
387 eerrorx ("%s: unable to exec `/sbin/halt': %s", applet, strerror (errno)); 387 eerrorx ("%s: unable to exec `/sbin/halt': %s", applet, strerror (errno));
388 } 388 }
389#endif 389#endif
390 390
391 newenv = rc_filter_env ();
392
391 if (cont) { 393 if (cont) {
392 int status = 0; 394 int status = 0;
393 pid_t pid = vfork(); 395 pid_t pid = vfork ();
394 396
395 if (pid == -1) 397 if (pid == -1)
396 eerrorx ("%s: vfork: %s", applet, strerror (errno)); 398 eerrorx ("%s: vfork: %s", applet, strerror (errno));
397 if (pid == 0) { 399 if (pid == 0) {
398 newenv = rc_filter_env ();
399#ifdef __linux__ 400#ifdef __linux__
400 execle ("/sbin/sulogin", "/sbin/sulogin", 401 execle ("/sbin/sulogin", "/sbin/sulogin",
401 getenv ("CONSOLE"), (char *) NULL, newenv); 402 getenv ("CONSOLE"), (char *) NULL, newenv);
402 eerror ("%s: unable to exec `/sbin/sulogin': %s", applet, 403 eerror ("%s: unable to exec `/sbin/sulogin': %s", applet,
403 strerror (errno)); 404 strerror (errno));
409 _exit (EXIT_FAILURE); 410 _exit (EXIT_FAILURE);
410 } 411 }
411 waitpid (pid, &status, 0); 412 waitpid (pid, &status, 0);
412 } else { 413 } else {
413#ifdef __linux 414#ifdef __linux
414 newenv = rc_filter_env ();
415 execle ("/sbin/sulogin", "/sbin/sulogin", 415 execle ("/sbin/sulogin", "/sbin/sulogin",
416 getenv ("CONSOLE"), (char *) NULL, newenv); 416 getenv ("CONSOLE"), (char *) NULL, newenv);
417 eerrorx ("%s: unable to exec `/sbin/sulogin': %s", applet, strerror (errno)); 417 eerrorx ("%s: unable to exec `/sbin/sulogin': %s", applet, strerror (errno));
418#else 418#else
419 exit (EXIT_SUCCESS); 419 exit (EXIT_SUCCESS);
540 signal (SIGCHLD, SIG_IGN); 540 signal (SIGCHLD, SIG_IGN);
541 for (pl = service_pids; pl; pl = pl->next) 541 for (pl = service_pids; pl; pl = pl->next)
542 kill (pl->pid, SIGTERM); 542 kill (pl->pid, SIGTERM);
543 543
544 /* Notify plugins we are aborting */ 544 /* Notify plugins we are aborting */
545 rc_plugin_run (rc_hook_abort, "rc"); 545 rc_plugin_run (rc_hook_abort, NULL);
546 546
547 /* Only drop into single user mode if we're booting */ 547 /* Only drop into single user mode if we're booting */
548 run = getenv ("RUNLEVEL"); 548 run = getenv ("RUNLEVEL");
549 prev = getenv ("PREVLEVEL"); 549 prev = getenv ("PREVLEVEL");
550 if ((prev && strcmp (prev, "S") == 0) || 550 if ((prev && strcmp (prev, "S") == 0) ||

Legend:
Removed from v.2650  
changed lines
  Added in v.2652

  ViewVC Help
Powered by ViewVC 1.1.20