[Pkg-sysvinit-commits] r1245 - in sysvinit/trunk/debian: . startpar
pere at alioth.debian.org
pere at alioth.debian.org
Tue Feb 26 06:55:13 UTC 2008
Author: pere
Date: 2008-02-26 06:55:11 +0000 (Tue, 26 Feb 2008)
New Revision: 1245
Modified:
sysvinit/trunk/debian/changelog
sysvinit/trunk/debian/startpar/makeboot.c
sysvinit/trunk/debian/startpar/startpar.c
Log:
* Patch startpar to use the correct path to the rcX.d/ directories
in "make mode".
Modified: sysvinit/trunk/debian/changelog
===================================================================
--- sysvinit/trunk/debian/changelog 2008-02-11 07:57:43 UTC (rev 1244)
+++ sysvinit/trunk/debian/changelog 2008-02-26 06:55:11 UTC (rev 1245)
@@ -6,6 +6,8 @@
* Update version trigger for the /etc/init.d/bootclean to this
version, to make sure those left with the file because of bug
#464869 get it removed on this upgrade.
+ * Patch startpar to use the correct path to the rcX.d/ directories
+ in "make mode".
-- Petter Reinholdtsen <pere at debian.org> Fri, 01 Feb 2008 19:37:42 +0100
Modified: sysvinit/trunk/debian/startpar/makeboot.c
===================================================================
--- sysvinit/trunk/debian/startpar/makeboot.c 2008-02-11 07:57:43 UTC (rev 1244)
+++ sysvinit/trunk/debian/startpar/makeboot.c 2008-02-26 06:55:11 UTC (rev 1245)
@@ -14,6 +14,11 @@
#include <limits.h>
#include "makeboot.h"
+#if 0 /* SUSE */
+# define RCDBASEDIR "/etc/init.d"
+#else /* Debian */
+# define RCDBASEDIR "/etc/init.d/.."
+#endif
int tree_entries = 0;
struct makenode *tree_list = NULL;
@@ -233,7 +238,7 @@
struct makenode *t, *next;
filter_prefix = prefix;
- snprintf(path, sizeof(path), "/etc/init.d/%s.d", dir);
+ snprintf(path, sizeof(path), RCDBASEDIR "/%s.d", dir);
ndirs = scandir(path, &dirlist, dirfilter, alphasort);
/* mark all matching nodes */
for (i = 0; i < ndirs; i++) {
@@ -287,7 +292,7 @@
{
char buf[4] = "rc0";
if (! strcmp(action, "boot")) {
- filter_files("boot", 'S', 0);
+ filter_files("S", 'S', 0);
} else if (! strcmp(action, "start")) {
buf[2] = *prev;
filter_files(buf, 'K', 1);
Modified: sysvinit/trunk/debian/startpar/startpar.c
===================================================================
--- sysvinit/trunk/debian/startpar/startpar.c 2008-02-11 07:57:43 UTC (rev 1244)
+++ sysvinit/trunk/debian/startpar/startpar.c 2008-02-26 06:55:11 UTC (rev 1245)
@@ -40,6 +40,9 @@
#include "makeboot.h"
#include "proc.h"
+/* SUSE and Debian */
+#define INITDDIR "/etc/init.d"
+
typedef enum _boolean {false, true} boolean;
extern char *optarg;
extern int optind;
@@ -331,7 +334,7 @@
if (run_mode) {
char path[128];
- snprintf(path, sizeof(path), "/etc/init.d/%s", p->name);
+ snprintf(path, sizeof(path), INITDDIR "/%s", p->name);
execlp(path, path, arg, (char *)0);
} else if (arg)
execlp(p->name, p->name, arg, (char *)0);
@@ -366,7 +369,7 @@
if (run_mode)
{
char path[128];
- snprintf(path, sizeof(path), "/etc/init.d/%s", prg);
+ snprintf(path, sizeof(path), INITDDIR "/%s", prg);
execlp(path, path, arg, (char *)0);
}
else if (arg)
@@ -623,7 +626,7 @@
fprintf(stderr, "invalid run mode %s\n", run_mode);
exit(1);
}
- snprintf(makefile, sizeof(makefile), "/etc/init.d/.depend.%s", run_mode);
+ snprintf(makefile, sizeof(makefile), INITDDIR "/.depend.%s", run_mode);
parse_makefile(makefile);
check_run_files(run_mode, prev_level, run_level);
More information about the Pkg-sysvinit-commits
mailing list