From cfb01635b7ce302a1e50e314ce365fac18e86af3a196b2ffb1d6869ad5839310 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Mon, 4 Oct 2010 14:49:02 +0000 Subject: [PATCH] . OBS-URL: https://build.opensuse.org/package/show/Base:System/sysvinit?expand=0&rev=73 --- killproc-2.16.dif | 34 +++++++++++++++++++++++++++++++--- sysvinit.changes | 6 ++++++ 2 files changed, 37 insertions(+), 3 deletions(-) diff --git a/killproc-2.16.dif b/killproc-2.16.dif index ac364b5..44db5da 100644 --- a/killproc-2.16.dif +++ b/killproc-2.16.dif @@ -2,8 +2,19 @@ +++ .dummy 2009-08-19 10:18:39.181901099 +0000 @@ -0,0 +1 @@ +this is a dummy, remove if real changes are required +--- checkproc.8 ++++ checkproc.8 2010-10-04 14:31:15.675926381 +0000 +@@ -278,6 +278,8 @@ Program is running + No process but pid file found + .IP 3 5 + No process and no pid file found ++.IP 4 5 ++Program is not installed + .RE + .RS 5 + .IP 101 7 --- checkproc.c -+++ checkproc.c 2009-12-07 15:42:55.783429631 +0000 ++++ checkproc.c 2010-10-04 14:44:56.355926370 +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,7 +33,13 @@ /* Check and verify the pid file */ errno = 0; -@@ -168,17 +168,22 @@ int main(int argc, char **argv) +@@ -163,22 +163,27 @@ int main(int argc, char **argv) + * the proc is dead if the specified pid can not be veryfied. + */ + if (remember_pids(pid_file,fullname,root,flags) < 0) +- exit(LSB_PROOFX); ++ exit(LSB_STATUS_PROOFX); + if (!remember) exit(LSB_STATUS_NOPROC); /* New LSB: no pid file is no job */ } @@ -52,7 +69,7 @@ } if (!remember) { /* No process found with pid file */ + if (pid_forced) -+ exit(LSB_STATUS_NOPROC); ++ exit(LSB_STATUS_PROOFX); if (pidof(fullname,root,flags) < 0) exit(LSB_STATUS_PROOFX); } @@ -371,6 +388,17 @@ goto ignore; /* Bogus */ comm = index(entry, ' '); +--- libinit.h ++++ libinit.h 2010-10-04 14:43:56.099926049 +0000 +@@ -93,7 +93,7 @@ + #define NOPIDREAD 101 /* trouble */ + + #define LSB_STATUS_PROOF ((errno == EPERM) ? LSB_NOPERM : NOPIDREAD ) +-#define LSB_STATUS_PROOFX ((errno == ENOENT) ? LSB_NOENTR : LSB_STATUS_PROOF ) ++#define LSB_STATUS_PROOFX ((errno == ENOENT) ? (flags & KILL) ? LSB_NOENTR : 4 : LSB_STATUS_PROOF ) + + #define LOG_OPTIONS (LOG_ODELAY|LOG_CONS) + #define LOG_FACILITY LOG_LOCAL7 --- startproc.8 +++ startproc.8 2009-12-03 17:00:05.739929445 +0000 @@ -59,9 +59,15 @@ processes are found. Note that diff --git a/sysvinit.changes b/sysvinit.changes index 6039f0a..27f6344 100644 --- a/sysvinit.changes +++ b/sysvinit.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Oct 4 16:46:53 CEST 2010 - werner@suse.de + +- Add exit code exception for checkproc for the case of a not + installed program, use exit code 4 (bnc#643433) + ------------------------------------------------------------------- Fri Oct 1 15:43:16 CEST 2010 - werner@suse.de