checked in
OBS-URL: https://build.opensuse.org/package/show/Base:System/sysvinit?expand=0&rev=19
This commit is contained in:
parent
4b442eedaa
commit
9b21f8ea08
@ -3,7 +3,7 @@
|
||||
@@ -0,0 +1 @@
|
||||
+this is a dummy, remove if real changes are required
|
||||
--- checkproc.c
|
||||
+++ checkproc.c 2009-12-07 15:42:55.783429631 +0000
|
||||
+++ checkproc.c 2009-12-03 16:44:04.899747448 +0000
|
||||
@@ -92,7 +92,6 @@ int main(int argc, char **argv)
|
||||
/* Allocate here: address optarg (current *argv) isn't freeable */
|
||||
if (optarg && !pid_file) {
|
||||
@ -22,42 +22,8 @@
|
||||
|
||||
/* Check and verify the pid file */
|
||||
errno = 0;
|
||||
@@ -168,17 +168,22 @@ int main(int argc, char **argv)
|
||||
if (!remember)
|
||||
exit(LSB_STATUS_NOPROC); /* New LSB: no pid file is no job */
|
||||
}
|
||||
- /* No pid file means that we have to search in /proc/ */
|
||||
free(pid_file);
|
||||
pid_file = NULL;
|
||||
+
|
||||
+ /* No pid file means that we have to search in /proc/ */
|
||||
}
|
||||
|
||||
if (pid_file && !st.st_size) {
|
||||
warn("Empty pid file %s for %s\n", pid_file, fullname);
|
||||
|
||||
- /* No pid file means that we have to search in /proc/ */
|
||||
free(pid_file);
|
||||
pid_file = NULL;
|
||||
+
|
||||
+ if (pid_forced)
|
||||
+ exit(LSB_STATUS_NOPROC);
|
||||
+
|
||||
+ /* No pid file means that we have to search in /proc/ */
|
||||
}
|
||||
|
||||
/* Check and verify the ignore file */
|
||||
@@ -205,6 +210,8 @@ int main(int argc, char **argv)
|
||||
exit(LSB_STATUS_PROOFX);
|
||||
}
|
||||
if (!remember) { /* No process found with pid file */
|
||||
+ if (pid_forced)
|
||||
+ exit(LSB_STATUS_NOPROC);
|
||||
if (pidof(fullname,root,flags) < 0)
|
||||
exit(LSB_STATUS_PROOFX);
|
||||
}
|
||||
--- killproc.c
|
||||
+++ killproc.c 2009-12-07 15:36:39.299430484 +0000
|
||||
+++ killproc.c 2009-12-03 16:54:05.999429895 +0000
|
||||
@@ -135,7 +135,6 @@ int main(int argc, char **argv)
|
||||
/* Allocate here: address optarg (current *argv) isn't freeable */
|
||||
if (optarg && !pid_file) {
|
||||
@ -66,41 +32,16 @@
|
||||
} else
|
||||
error(LSB_WRGSYN,"Option -p requires pid file to read pid from\n");
|
||||
break;
|
||||
@@ -195,7 +194,8 @@ int main(int argc, char **argv)
|
||||
pid_file = (char*) xmalloc(DEFPIDLEN+strlen(basename)+1);
|
||||
pid_file = strcat(strcat(strcpy(pid_file,DEFPIDDIR),basename),DEFPIDEXT);
|
||||
}
|
||||
@@ -218,7 +217,8 @@ int main(int argc, char **argv)
|
||||
/* No pid file means that we have to search in /proc/ */
|
||||
free(pid_file);
|
||||
pid_file = NULL;
|
||||
- }
|
||||
+ } else
|
||||
+ pid_forced = true;
|
||||
|
||||
/* Check and verify the pid file */
|
||||
errno = 0;
|
||||
@@ -215,17 +215,22 @@ int main(int argc, char **argv)
|
||||
if (!remember)
|
||||
exit(LSB_NOPROC); /* New LSB: no pid file is no job */
|
||||
}
|
||||
- /* No pid file means that we have to search in /proc/ */
|
||||
free(pid_file);
|
||||
pid_file = NULL;
|
||||
+
|
||||
+ /* No pid file means that we have to search in /proc/ */
|
||||
}
|
||||
|
||||
if (pid_file && !st.st_size) {
|
||||
warn("Empty pid file %s for %s\n", pid_file, fullname);
|
||||
|
||||
- /* No pid file means that we have to search in /proc/ */
|
||||
free(pid_file);
|
||||
pid_file = NULL;
|
||||
+
|
||||
+ if (pid_forced)
|
||||
+ exit(LSB_STATUS_NOPROC);
|
||||
+
|
||||
+ /* No pid file means that we have to search in /proc/ */
|
||||
}
|
||||
|
||||
if (pid_file) { /* The case of having a pid file */
|
||||
--- libinit.c
|
||||
+++ libinit.c 2009-10-28 09:47:13.711429753 +0000
|
||||
@@ -320,13 +320,15 @@ static ssize_t xread(int fd, void *inbuf
|
||||
@ -281,7 +222,7 @@
|
||||
The pid read from this file is compared against the pids of possible
|
||||
running processes that use the specified executable. In order to avoid
|
||||
--- startproc.c
|
||||
+++ startproc.c 2009-12-07 14:15:44.487929547 +0000
|
||||
+++ startproc.c 2009-12-03 16:49:23.567929544 +0000
|
||||
@@ -41,7 +41,8 @@ static int do_start(const char *name, ch
|
||||
static void closefds(FILE *not);
|
||||
static void waiton(const char *list);
|
||||
@ -347,40 +288,13 @@
|
||||
|
||||
/* Check and verify the pid file */
|
||||
errno = 0;
|
||||
@@ -296,17 +298,25 @@ int main(int argc, char **argv)
|
||||
if (errno != ENOENT)
|
||||
warn("Can not stat %s: %s\n", pid_file, strerror(errno));
|
||||
|
||||
- /* No pid file means that we have to search in /proc/ */
|
||||
@@ -299,6 +301,9 @@ int main(int argc, char **argv)
|
||||
/* No pid file means that we have to search in /proc/ */
|
||||
free(pid_file);
|
||||
pid_file = NULL;
|
||||
+
|
||||
+ if (force && errno == ENOENT)
|
||||
+ goto force;
|
||||
+
|
||||
+ /* No pid file means that we have to search in /proc/ */
|
||||
}
|
||||
|
||||
if (pid_file && !st.st_size) {
|
||||
warn("Empty pid file %s for %s\n", pid_file, fullname);
|
||||
|
||||
- /* No pid file means that we have to search in /proc/ */
|
||||
free(pid_file);
|
||||
pid_file = NULL;
|
||||
+
|
||||
+ if (force)
|
||||
+ goto force;
|
||||
+
|
||||
+ /* No pid file means that we have to search in /proc/ */
|
||||
}
|
||||
|
||||
if (pid_file) { /* The case of having a pid file */
|
||||
@@ -336,6 +346,8 @@ int main(int argc, char **argv)
|
||||
|
||||
/* Do main work */
|
||||
if (!remember) { /* No process found with pid file */
|
||||
+ if (force)
|
||||
+ goto force;
|
||||
if (pidof(fullname,root,flags) < 0)
|
||||
exit(LSB_PROOFX);
|
||||
clear_pids(); /* Remove all pids which should be ignored */
|
||||
|
@ -1,8 +1,3 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Dec 7 16:25:38 CET 2009 - werner@suse.de
|
||||
|
||||
- The same procedure for killproc.c its self (caused by bnc#559534)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Dec 3 18:01:10 CET 2009 - werner@suse.de
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user