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

Diff of /trunk/src/rc.c

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

Revision 2853 Revision 2854
41#include "strlist.h" 41#include "strlist.h"
42 42
43#define INITSH RC_LIBDIR "/sh/init.sh" 43#define INITSH RC_LIBDIR "/sh/init.sh"
44#define INITEARLYSH RC_LIBDIR "/sh/init-early.sh" 44#define INITEARLYSH RC_LIBDIR "/sh/init-early.sh"
45#define HALTSH RC_INITDIR "/halt.sh" 45#define HALTSH RC_INITDIR "/halt.sh"
46
47#define SHUTDOWN "/sbin/shutdown"
46#define SULOGIN "/sbin/sulogin" 48#define SULOGIN "/sbin/sulogin"
47 49
48#define INTERACTIVE RC_SVCDIR "/interactive" 50#define INTERACTIVE RC_SVCDIR "/interactive"
49 51
50#define DEVBOOT "/dev/.rcboot" 52#define DEVBOOT "/dev/.rcboot"
942 } 944 }
943 } else if (strcmp (newlevel, RC_LEVEL_REBOOT) == 0) { 945 } else if (strcmp (newlevel, RC_LEVEL_REBOOT) == 0) {
944 if (! RUNLEVEL || 946 if (! RUNLEVEL ||
945 strcmp (RUNLEVEL, "6") != 0) 947 strcmp (RUNLEVEL, "6") != 0)
946 { 948 {
947 execl ("/sbin/shutdown", "/sbin/shutdown", "-r", "now", (char *) NULL); 949 execl (SHUTDOWN, SHUTDOWN, "-r", "now", (char *) NULL);
948 eerrorx ("%s: unable to exec `/sbin/shutdown': %s", 950 eerrorx ("%s: unable to exec `" SHUTDOWN "': %s",
949 applet, strerror (errno)); 951 applet, strerror (errno));
950 } 952 }
951 } else if (strcmp (newlevel, RC_LEVEL_SHUTDOWN) == 0) { 953 } else if (strcmp (newlevel, RC_LEVEL_SHUTDOWN) == 0) {
952 if (! RUNLEVEL || 954 if (! RUNLEVEL ||
953 strcmp (RUNLEVEL, "0") != 0) 955 strcmp (RUNLEVEL, "0") != 0)
954 { 956 {
955 execl ("/sbin/shutdown", "/sbin/shutdown", 957 execl (SHUTDOWN, SHUTDOWN,
956#ifdef __linux 958#ifdef __linux
957 "-h", 959 "-h",
958#else 960#else
959 "-p", 961 "-p",
960#endif 962#endif
961 "now", (char *) NULL); 963 "now", (char *) NULL);
962 eerrorx ("%s: unable to exec `/sbin/shutdown': %s", 964 eerrorx ("%s: unable to exec `" SHUTDOWN "': %s",
963 applet, strerror (errno)); 965 applet, strerror (errno));
964 } 966 }
965 } 967 }
966 } 968 }
967 969

Legend:
Removed from v.2853  
changed lines
  Added in v.2854

  ViewVC Help
Powered by ViewVC 1.1.20