Updating link to change in openSUSE:Factory/sysvinit revision 58.0

OBS-URL: https://build.opensuse.org/package/show/Base:System/sysvinit?expand=0&rev=ca37d1c17702c984ad7cb3cee5fdef46
This commit is contained in:
OBS User buildservice-autocommit 2009-12-08 11:16:08 +00:00 committed by Git OBS Bridge
parent 9b21f8ea08
commit 44f5fe1780
3 changed files with 101 additions and 10 deletions

View File

@ -3,7 +3,7 @@
@@ -0,0 +1 @@
+this is a dummy, remove if real changes are required
--- checkproc.c
+++ checkproc.c 2009-12-03 16:44:04.899747448 +0000
+++ checkproc.c 2009-12-07 15:42:55.783429631 +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,8 +22,42 @@
/* 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-03 16:54:05.999429895 +0000
+++ killproc.c 2009-12-07 15:36:39.299430484 +0000
@@ -135,7 +135,6 @@ int main(int argc, char **argv)
/* Allocate here: address optarg (current *argv) isn't freeable */
if (optarg && !pid_file) {
@ -32,16 +66,41 @@
} else
error(LSB_WRGSYN,"Option -p requires pid file to read pid from\n");
break;
@@ -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;
@@ -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);
}
- }
+ } 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
@ -222,7 +281,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-03 16:49:23.567929544 +0000
+++ startproc.c 2009-12-07 14:15:44.487929547 +0000
@@ -41,7 +41,8 @@ static int do_start(const char *name, ch
static void closefds(FILE *not);
static void waiton(const char *list);
@ -288,13 +347,40 @@
/* Check and verify the pid file */
errno = 0;
@@ -299,6 +301,9 @@ int main(int argc, char **argv)
/* No pid file means that we have to search in /proc/ */
@@ -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/ */
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 */

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
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

View File

@ -30,7 +30,7 @@ Group: System/Base
PreReq: coreutils
AutoReqProv: on
Version: 2.86
Release: 216
Release: 217
Summary: SysV-Style init
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: libselinux-devel libsepol-devel