checked in
OBS-URL: https://build.opensuse.org/package/show/Base:System/sysvinit?expand=0&rev=15
This commit is contained in:
parent
50f51f372a
commit
30ec649d5a
@ -1,30 +1,6 @@
|
||||
--- .dummy
|
||||
+++ .dummy 2009-08-19 12:18:39.181901099 +0200
|
||||
@@ -0,0 +1 @@
|
||||
+this is a dummy, remove if real changes are required
|
||||
--- libinit.c
|
||||
+++ libinit.c 2009-10-28 10:47:13.711429753 +0100
|
||||
@@ -320,13 +320,15 @@ static ssize_t xread(int fd, void *inbuf
|
||||
while (1) {
|
||||
errno = 0;
|
||||
bytes = read(fd, inbuf, count);
|
||||
- if (bytes < 0 && (errno == EINTR || errno == EAGAIN))
|
||||
- continue;
|
||||
- if (bytes < 0)
|
||||
+ if (bytes < 0) {
|
||||
+ if (errno == EINTR || errno == EAGAIN)
|
||||
+ continue;
|
||||
+ if (errno == ESRCH)
|
||||
+ goto out;
|
||||
break;
|
||||
+ }
|
||||
goto out;
|
||||
}
|
||||
-
|
||||
warn("xread error: %s\n", strerror(errno));
|
||||
out:
|
||||
errno = olderr;
|
||||
@@ -446,9 +448,9 @@ static pid_t getpppid(const pid_t ppid)
|
||||
+++ libinit.c 2009-09-29 10:42:09.875428620 +0200
|
||||
@@ -446,9 +446,9 @@ static pid_t getpppid(const pid_t ppid)
|
||||
goto out;
|
||||
|
||||
if ((fp = open(proc(pid, "stat"), O_PROCMODE)) != -1) {
|
||||
@ -36,7 +12,7 @@
|
||||
warn("can not read ppid for process %d!\n", ppid);
|
||||
}
|
||||
out:
|
||||
@@ -591,10 +593,11 @@ int pidof (const char * inname, const ch
|
||||
@@ -591,10 +591,11 @@ int pidof (const char * inname, const ch
|
||||
char ent[3];
|
||||
boolean thread;
|
||||
ssize_t len;
|
||||
@ -49,7 +25,7 @@
|
||||
continue;
|
||||
|
||||
thread = (strncmp(ent, "0 ", 2) == 0);
|
||||
@@ -682,6 +685,9 @@ int pidof (const char * inname, const ch
|
||||
@@ -682,6 +683,9 @@ int pidof (const char * inname, const ch
|
||||
len = xread(fp, entry, PATH_MAX);
|
||||
close(fp);
|
||||
|
||||
@ -59,7 +35,7 @@
|
||||
/* Seek for a script not for a binary */
|
||||
if (!(scrpt = checkscripts(entry, root, len, d->d_name)))
|
||||
continue;
|
||||
@@ -713,7 +719,7 @@ int pidof (const char * inname, const ch
|
||||
@@ -713,7 +717,7 @@ int pidof (const char * inname, const ch
|
||||
len = xread(fp, entry, PATH_MAX);
|
||||
close(fp);
|
||||
|
||||
@ -68,7 +44,7 @@
|
||||
continue;
|
||||
|
||||
comm = index(entry, ' ');
|
||||
@@ -764,7 +770,8 @@ int verify_pidfile (const char * pid_fil
|
||||
@@ -764,7 +768,8 @@ int verify_pidfile (const char * pid_fil
|
||||
const char * root, unsigned short flags,
|
||||
const boolean ignore)
|
||||
{
|
||||
@ -78,7 +54,7 @@
|
||||
boolean isscrpt = false;
|
||||
pid_t pid;
|
||||
char *swapname = NULL, *bufp;
|
||||
@@ -789,11 +796,12 @@ int verify_pidfile (const char * pid_fil
|
||||
@@ -789,11 +794,12 @@ int verify_pidfile (const char * pid_fil
|
||||
}
|
||||
|
||||
errno = 0;
|
||||
@ -93,7 +69,7 @@
|
||||
buf[cnt] = '\0';
|
||||
|
||||
bufp = buf;
|
||||
@@ -847,10 +855,11 @@ int verify_pidfile (const char * pid_fil
|
||||
@@ -847,10 +853,11 @@ int verify_pidfile (const char * pid_fil
|
||||
char ent[3];
|
||||
boolean thread;
|
||||
ssize_t len;
|
||||
@ -106,7 +82,7 @@
|
||||
goto out;
|
||||
|
||||
thread = (strncmp(ent, "0 ", 2) == 0);
|
||||
@@ -932,6 +941,9 @@ int verify_pidfile (const char * pid_fil
|
||||
@@ -932,6 +939,9 @@ int verify_pidfile (const char * pid_fil
|
||||
len = xread(fp, entry, PATH_MAX);
|
||||
close(fp);
|
||||
|
||||
@ -116,7 +92,7 @@
|
||||
/* Seek for a script not for a binary */
|
||||
if (!(scrpt = checkscripts(entry, root, len, buf)))
|
||||
goto out; /* Nothing found */
|
||||
@@ -951,7 +963,7 @@ int verify_pidfile (const char * pid_fil
|
||||
@@ -951,7 +961,7 @@ int verify_pidfile (const char * pid_fil
|
||||
len = xread(fp, entry, PATH_MAX);
|
||||
close(fp);
|
||||
|
||||
@ -125,7 +101,7 @@
|
||||
goto out;
|
||||
|
||||
comm = index(entry, ' ');
|
||||
@@ -1040,7 +1052,7 @@ int check_pids (const char * inname, con
|
||||
@@ -1040,7 +1050,7 @@ int check_pids (const char * inname, con
|
||||
len = xread(fp, ent, sizeof(ent));
|
||||
close(fp);
|
||||
|
||||
@ -134,7 +110,7 @@
|
||||
goto ignore; /* Bogus */
|
||||
|
||||
thread = (strncmp(ent, "0 ", 2) == 0);
|
||||
@@ -1111,7 +1123,7 @@ int check_pids (const char * inname, con
|
||||
@@ -1111,7 +1121,7 @@ int check_pids (const char * inname, con
|
||||
len = xread(fp, entry, PATH_MAX);
|
||||
close(fp);
|
||||
|
||||
@ -143,7 +119,7 @@
|
||||
goto ignore; /* Bogus */
|
||||
|
||||
/* Seek for a script not for a binary */
|
||||
@@ -1131,7 +1143,7 @@ int check_pids (const char * inname, con
|
||||
@@ -1131,7 +1141,7 @@ int check_pids (const char * inname, con
|
||||
len = xread(fp, entry, PATH_MAX);
|
||||
close(fp);
|
||||
|
||||
|
@ -1,8 +1,6 @@
|
||||
Index: man/init.8
|
||||
===================================================================
|
||||
--- man/init.8.orig
|
||||
+++ man/init.8
|
||||
@@ -232,7 +232,7 @@ It activates the \fIkbrequest\fP action.
|
||||
--- man/init.8
|
||||
+++ man/init.8 Fri Mar 12 12:44:29 2004
|
||||
@@ -232,7 +232,7 @@
|
||||
.SH CONFORMING TO
|
||||
\fBInit\fP is compatible with the System V init. It works closely
|
||||
together with the scripts in the directories
|
||||
@ -11,13 +9,11 @@ Index: man/init.8
|
||||
If your system uses this convention, there should be a \fIREADME\fP
|
||||
file in the directory \fI/etc/init.d\fP explaining how these scripts work.
|
||||
.\"}}}
|
||||
Index: src/paths.h
|
||||
===================================================================
|
||||
--- src/paths.h.orig
|
||||
+++ src/paths.h
|
||||
@@ -26,10 +26,10 @@
|
||||
--- src/paths.h
|
||||
+++ src/paths.h Fri Mar 12 12:45:00 2004
|
||||
@@ -25,10 +25,10 @@
|
||||
#define SDPID "/var/run/shutdown.pid" /* PID of shutdown program */
|
||||
#define SHELL "/bin/sh" /* Default shell */
|
||||
#define SULOGIN "/sbin/sulogin" /* Sulogin */
|
||||
#define INITSCRIPT "/etc/initscript" /* Initscript. */
|
||||
-#define PWRSTAT "/etc/powerstatus" /* COMPAT: SIGPWR reason (OK/BAD) */
|
||||
+#define PWRSTAT "/var/run/powerstatus" /* COMPAT: SIGPWR reason (OK/BAD) */
|
||||
|
@ -1,42 +0,0 @@
|
||||
---
|
||||
src/killall5.c | 10 ++++++++--
|
||||
1 file changed, 8 insertions(+), 2 deletions(-)
|
||||
|
||||
Index: src/killall5.c
|
||||
===================================================================
|
||||
--- src/killall5.c.orig
|
||||
+++ src/killall5.c
|
||||
@@ -62,6 +62,7 @@ typedef struct proc {
|
||||
char isfuse; /* Provides FUSE filesystems */
|
||||
char isudev; /* Is the uevent handler */
|
||||
char nfs; /* Binary is loacted on NFS part. */
|
||||
+ char ismdmon; /* Is an instance of /sbin/mdmon. */
|
||||
struct proc *next; /* Pointer to next struct. */
|
||||
} PROC;
|
||||
|
||||
@@ -609,6 +610,9 @@ int readproc()
|
||||
/* Check for uevent handler */
|
||||
p->isudev = (strncmp(buf, "/sbin/udevd", 11) == 0);
|
||||
|
||||
+ /* Check for mdmon */
|
||||
+ p->ismdmon = (strcmp(buf, "/sbin/mdmon") == 0);
|
||||
+
|
||||
/* Check for provider of FUSE filesystems */
|
||||
p->isfuse = is_fuse(d->d_name);
|
||||
|
||||
@@ -947,11 +951,13 @@ int main(int argc, char **argv)
|
||||
}
|
||||
clear_mnt();
|
||||
|
||||
- /* Now kill all processes except init (pid 1), our session, and FUSE filesystems. */
|
||||
+ /* Now kill all processes except init (pid 1), our session,
|
||||
+ * FUSE filesystems and /sbin/mdmon */
|
||||
sid = (int)getsid(0);
|
||||
pid = (int)getpid();
|
||||
for (p = plist; p; p = p->next) {
|
||||
- if (p->pid == 1 || p->pid == pid || p->sid == sid || p->kernel || p->isfuse) {
|
||||
+ if (p->pid == 1 || p->pid == pid || p->sid == sid || p->kernel
|
||||
+ || p->isfuse || p->ismdmon) {
|
||||
kill(p->pid, SIGCONT);
|
||||
continue;
|
||||
}
|
@ -1,7 +1,5 @@
|
||||
Index: src/init.c
|
||||
===================================================================
|
||||
--- src/init.c.orig
|
||||
+++ src/init.c
|
||||
--- src/init.c
|
||||
+++ src/init.c 2005-10-19 12:01:15.000000000 +0200
|
||||
@@ -20,6 +20,14 @@
|
||||
*
|
||||
*/
|
||||
@ -17,7 +15,7 @@ Index: src/init.c
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/ioctl.h>
|
||||
@@ -976,6 +984,7 @@ int spawn(CHILD *ch, int *res)
|
||||
@@ -966,6 +974,7 @@
|
||||
dup(f);
|
||||
dup(f);
|
||||
}
|
||||
@ -25,7 +23,7 @@ Index: src/init.c
|
||||
if ((pid = fork()) < 0) {
|
||||
initlog(L_VB, "cannot fork");
|
||||
exit(1);
|
||||
@@ -988,7 +997,6 @@ int spawn(CHILD *ch, int *res)
|
||||
@@ -978,7 +987,6 @@
|
||||
SETSIG(sa, SIGINT, SIG_IGN, SA_RESTART);
|
||||
SETSIG(sa, SIGTSTP, SIG_IGN, SA_RESTART);
|
||||
SETSIG(sa, SIGQUIT, SIG_IGN, SA_RESTART);
|
||||
|
@ -1,8 +1,6 @@
|
||||
Index: src/init.c
|
||||
===================================================================
|
||||
--- src/init.c.orig
|
||||
+++ src/init.c
|
||||
@@ -107,6 +107,8 @@ sig_atomic_t got_signals; /* Set if we r
|
||||
--- src/init.c
|
||||
+++ src/init.c 2006-08-22 15:04:27.000000000 +0200
|
||||
@@ -115,6 +115,8 @@ sig_atomic_t got_signals; /* Set if we r
|
||||
int emerg_shell = 0; /* Start emergency shell? */
|
||||
int wrote_wtmp_reboot = 1; /* Set when we wrote the reboot record */
|
||||
int wrote_utmp_reboot = 1; /* Set when we wrote the reboot record */
|
||||
@ -11,7 +9,7 @@ Index: src/init.c
|
||||
int sltime = 5; /* Sleep time between TERM and KILL */
|
||||
char *argv0; /* First arguments; show up in ps listing */
|
||||
int maxproclen; /* Maximal length of argv[0] with \0 */
|
||||
@@ -176,6 +178,8 @@ struct {
|
||||
@@ -184,6 +186,8 @@ struct {
|
||||
{ "-WU", D_WROTE_UTMP_REBOOT},
|
||||
{ "-ST", D_SLTIME },
|
||||
{ "-DB", D_DIDBOOT },
|
||||
@ -20,7 +18,7 @@ Index: src/init.c
|
||||
{ "", 0 }
|
||||
};
|
||||
struct {
|
||||
@@ -371,6 +375,12 @@ static CHILD *get_record(FILE *f)
|
||||
@@ -379,6 +383,12 @@ static CHILD *get_record(FILE *f)
|
||||
case D_DIDBOOT:
|
||||
fscanf(f, "%d\n", &did_boot);
|
||||
break;
|
||||
@ -33,7 +31,7 @@ Index: src/init.c
|
||||
default:
|
||||
if (cmd > 0 || cmd == C_EOF) {
|
||||
oops_error = -1;
|
||||
@@ -1697,6 +1707,8 @@ int read_level(int arg)
|
||||
@@ -1705,6 +1715,8 @@ int read_level(int arg)
|
||||
}
|
||||
|
||||
/* Store both the old and the new runlevel. */
|
||||
@ -42,7 +40,7 @@ Index: src/init.c
|
||||
write_utmp_wtmp("runlevel", "~~", foo + 256*runlevel, RUN_LVL, "~");
|
||||
thislevel = foo;
|
||||
prevlevel = runlevel;
|
||||
@@ -1897,6 +1909,25 @@ void re_exec(void)
|
||||
@@ -1905,6 +1917,25 @@ void re_exec(void)
|
||||
initlog(L_CO, "Attempt to re-exec failed");
|
||||
}
|
||||
|
||||
@ -68,7 +66,7 @@ Index: src/init.c
|
||||
|
||||
/*
|
||||
* We got a change runlevel request through the
|
||||
@@ -1928,6 +1959,7 @@ void fifo_new_level(int level)
|
||||
@@ -1936,6 +1967,7 @@ void fifo_new_level(int level)
|
||||
if (oldlevel != 'S' && runlevel == 'S') console_stty();
|
||||
if (runlevel == '6' || runlevel == '0' ||
|
||||
runlevel == '1') console_stty();
|
||||
@ -76,7 +74,7 @@ Index: src/init.c
|
||||
read_inittab();
|
||||
fail_cancel();
|
||||
setproctitle("init [%c]", runlevel);
|
||||
@@ -2223,6 +2255,8 @@ void boot_transitions()
|
||||
@@ -2231,6 +2263,8 @@ void boot_transitions()
|
||||
}
|
||||
if (loglevel > 0) {
|
||||
initlog(L_VB, "Entering runlevel: %c", runlevel);
|
||||
@ -85,7 +83,7 @@ Index: src/init.c
|
||||
write_utmp_wtmp("runlevel", "~~", runlevel + 256 * oldlevel, RUN_LVL, "~");
|
||||
thislevel = runlevel;
|
||||
prevlevel = oldlevel;
|
||||
@@ -2401,6 +2435,7 @@ int init_main()
|
||||
@@ -2409,6 +2443,7 @@ int init_main()
|
||||
console_init();
|
||||
|
||||
if (!reload) {
|
||||
@ -93,7 +91,7 @@ Index: src/init.c
|
||||
|
||||
/* Close whatever files are open, and reset the console. */
|
||||
close(0);
|
||||
@@ -2418,7 +2453,8 @@ int init_main()
|
||||
@@ -2426,7 +2461,8 @@ int init_main()
|
||||
* Initialize /var/run/utmp (only works if /var is on
|
||||
* root and mounted rw)
|
||||
*/
|
||||
@ -103,10 +101,8 @@ Index: src/init.c
|
||||
|
||||
/*
|
||||
* Say hello to the world
|
||||
Index: src/init.h
|
||||
===================================================================
|
||||
--- src/init.h.orig
|
||||
+++ src/init.h
|
||||
--- src/init.h
|
||||
+++ src/init.h 2006-08-22 14:29:39.000000000 +0200
|
||||
@@ -99,6 +99,10 @@ typedef struct _child_ {
|
||||
extern CHILD *family;
|
||||
extern int wrote_wtmp_reboot;
|
||||
@ -125,10 +121,8 @@ Index: src/init.h
|
||||
+#define D_WROTE_WTMP_RLEVEL -16
|
||||
+#define D_WROTE_UTMP_RLEVEL -17
|
||||
|
||||
Index: src/utmp.c
|
||||
===================================================================
|
||||
--- src/utmp.c.orig
|
||||
+++ src/utmp.c
|
||||
--- src/utmp.c
|
||||
+++ src/utmp.c 2006-08-22 14:28:52.000000000 +0200
|
||||
@@ -49,6 +49,12 @@ char *line) /* Which line is this */
|
||||
struct utsname uname_buf;
|
||||
|
||||
|
@ -1,23 +1,3 @@
|
||||
-------------------------------------------------------------------
|
||||
Sun Nov 15 14:01:30 CET 2009 - meissner@suse.de
|
||||
|
||||
- refresh all patches with fuzz=0
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Nov 2 17:10:48 CET 2009 - mmarek@suse.cz
|
||||
|
||||
- fixed killproc-2.16.dif.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Oct 29 22:39:27 CET 2009 - mmarek@suse.cz
|
||||
|
||||
- killall5: do not kill /sbin/mdmon (fate#306823).
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Oct 28 10:47:42 CET 2009 - werner@suse.de
|
||||
|
||||
- Avoid message on terminated process during reading its /proc files
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Sep 29 10:48:03 CEST 2009 - werner@suse.de
|
||||
|
||||
|
@ -63,7 +63,6 @@ Patch16: sysvinit-2.86-full-time.patch
|
||||
Patch17: sysvinit-2.86-hddown.patch
|
||||
Patch18: sysvinit-2.86-selinux.patch
|
||||
Patch19: sysvinit-2.86-fuse-no-kill.patch
|
||||
Patch20: sysvinit-2.86-mdmon-no-kill.patch
|
||||
|
||||
%description
|
||||
System V style init programs by Miquel van Smoorenburg that control the
|
||||
@ -99,7 +98,6 @@ Authors:
|
||||
%patch -P 17 -b .hddown
|
||||
%patch -P 18 -b .selinux
|
||||
%patch -P 19 -b .fuse
|
||||
%patch -P 20 -b .mdmon
|
||||
%patch
|
||||
pushd ../powerd-%{PDVER}
|
||||
%patch -P 2
|
||||
|
Loading…
Reference in New Issue
Block a user