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

OBS-URL: https://build.opensuse.org/package/show/Base:System/sysvinit?expand=0&rev=154c24a237c1859d37a26f3fb0e5e3f3
This commit is contained in:
OBS User buildservice-autocommit 2009-12-07 14:53:19 +00:00 committed by Git OBS Bridge
parent bf8066ff90
commit 3abefbcaa9
3 changed files with 156 additions and 4 deletions

View File

@ -1,9 +1,49 @@
--- .dummy
+++ .dummy 2009-08-19 12:18:39.181901099 +0200
+++ .dummy 2009-08-19 10:18:39.181901099 +0000
@@ -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
@@ -92,7 +92,6 @@ int main(int argc, char **argv)
/* Allocate here: address optarg (current *argv) isn't freeable */
if (optarg && !pid_file) {
pid_file = xstrdup(optarg);
- pid_forced = true;
} else
error(WRGSYNTAX, "Option -p requires pid file to read pid from\n");
break;
@@ -148,7 +147,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;
--- killproc.c
+++ 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) {
pid_file = xstrdup(optarg);
- pid_forced = true;
} 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;
- }
+ } else
+ pid_forced = true;
if (pid_file && !st.st_size) {
warn("Empty pid file %s for %s\n", pid_file, fullname);
--- libinit.c
+++ libinit.c 2009-10-28 10:47:13.711429753 +0100
+++ libinit.c 2009-10-28 09:47:13.711429753 +0000
@@ -320,13 +320,15 @@ static ssize_t xread(int fd, void *inbuf
while (1) {
errno = 0;
@ -152,3 +192,109 @@
goto ignore; /* Bogus */
comm = index(entry, ' ');
--- startproc.8
+++ startproc.8 2009-12-03 17:00:05.739929445 +0000
@@ -59,9 +59,15 @@ processes are found. Note that
is designed to start a daemon but not a kernel thread or
a program which enables a kernel thread.
.PP
+Without any option
.B startproc
-does not use the pid to search for a process but the full
-path of the corresponding program which is used to identify the executable
+does search for a process by using the full
+path of the corresponding program and a default pid file
+.RB (/var/run/ <basename> .pid)
+which are used together to identify the executable
+out from the
+.I /proc
+file system
.RB (see " proc" (5)).
Only if the inode number
.RB (/proc/ <pid> /exe)
@@ -81,7 +87,7 @@ changed due to the LSB specification).
If this option is specified,
.B startproc
tries to check against the pid read from this file
-instead of the default
+instead of the default pid file
.RB (/var/run/ <basename> .pid).
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
@@ -41,7 +41,8 @@ static int do_start(const char *name, ch
static void closefds(FILE *not);
static void waiton(const char *list);
-static int quiet = 1, supprmsg = 0, sess = 0, seconds = 0, sigchld = 0, force = 0, dialog = 0;
+static int quiet = true, supprmsg = false, sess = false, seconds = false;
+static int sigchld = false, force = false, dialog = false;
static struct passwd *user = NULL;
static struct group *grp = NULL;
static int syslogd = 0;
@@ -54,7 +55,7 @@ static void (*save_sigquit) = SIG_DFL;
static void sig_quit(int nsig)
{
(void)signal(nsig, save_sigquit);
- signaled = 1;
+ signaled = true;
}
static void sig_chld(int nsig)
@@ -113,10 +114,10 @@ int main(int argc, char **argv)
error(LSB_WRGSYN,"Option -c requires special root directory\n");
break;
case 'e':
- env = 1;
+ env = true;
break;
case 'd':
- dialog = 1;
+ dialog = true;
seconds = 15;
break;
case 'p': /* Former option -f */
@@ -129,7 +130,7 @@ int main(int argc, char **argv)
error(LSB_WRGSYN,"Option -p requires pid file to read pid from\n");
break;
case 'f': /* Newer option -f for force start (LSB specs!) */
- force++;
+ force = true;
break;
case 'l':
if (optarg && optarg[0] != '-' && !log_file) {
@@ -158,11 +159,11 @@ int main(int argc, char **argv)
error(LSB_WRGSYN,"Option -n requires nice level\n");
break;
case 'q':
- supprmsg = 1;
+ supprmsg = true;
break;
case 's':
if (sdaemon) goto fail;
- sess = 1;
+ sess = true;
break;
case 'u':
if (optarg && optarg[0] != '/' && optarg[0] != '-') {
@@ -288,7 +289,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
+ force = true;
/* 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/ */
free(pid_file);
pid_file = NULL;
+
+ if (force && errno == ENOENT)
+ goto force;
}
if (pid_file && !st.st_size) {

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu Dec 3 18:01:10 CET 2009 - werner@suse.de
- Add missed line to startproc.c and also make manual page more
clear how startproc works (caused by bnc#559534)
-------------------------------------------------------------------
Sun Nov 15 14:01:30 CET 2009 - meissner@suse.de

View File

@ -25,12 +25,12 @@ Name: sysvinit
%define SCVER 1.10
%define SIVER 2.86
%define START 0.54
License: GPL v2 or later
License: GPLv2+
Group: System/Base
PreReq: coreutils
AutoReqProv: on
Version: 2.86
Release: 215
Release: 216
Summary: SysV-Style init
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: libselinux-devel libsepol-devel