Compare commits
80 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5bbe08aad9 | ||
|
|
1b0e47b488 | ||
|
|
9349eae9b1 | ||
|
|
eb0ab72cba | ||
|
|
47b279bc28 | ||
|
|
8c1aa5b5b1 | ||
|
|
bb1d48a85d | ||
|
|
8b333c447e | ||
|
|
96c0c95752 | ||
|
|
96848ab1f5 | ||
|
|
7538863f6a | ||
|
|
6daa74388e | ||
|
|
310c5468af | ||
|
|
4bbee5dbc7 | ||
|
|
2944a23185 | ||
|
|
c36c4032a3 | ||
|
|
1891e83e67 | ||
|
|
039741aedd | ||
|
|
89d1ab7597 | ||
|
|
360fa1af70 | ||
|
|
a26acc5633 | ||
|
|
3edc9e7156 | ||
|
|
077e54a5e5 | ||
|
|
03b0903bf7 | ||
|
|
25454a5bc6 | ||
|
|
07d626226c | ||
|
|
6df30f1d93 | ||
|
|
6ea36c7574 | ||
|
|
f420835c3e | ||
|
|
98a4f2d7fa | ||
|
|
60860f3981 | ||
|
|
85706b32e8 | ||
|
|
b9ae6c686d | ||
|
|
dd3667fd15 | ||
|
|
adfc4f92f0 | ||
|
|
6c8f335774 | ||
|
|
013ebf0ed2 | ||
|
|
2348e3ee26 | ||
|
|
a5f64464a1 | ||
|
|
7aec19654f | ||
|
|
369b9c245d | ||
|
|
4b54411e24 | ||
|
|
13dcb2a8d8 | ||
|
|
29b380cda1 | ||
| 59d2e48f65 | |||
| 27df622c49 | |||
|
|
95bf015b0d | ||
|
|
6eb4550aff | ||
| fb3df4161b | |||
| 491dadb43e | |||
| 61e0051716 | |||
|
|
6eb48a02f8 | ||
| a5e8049cdf | |||
| 7be10ac811 | |||
| fb5c0a0097 | |||
|
|
ca1f12388b | ||
| 5f8b1c9674 | |||
| 2830b81be1 | |||
|
|
1a91ebffa9 | ||
| 168a557bb5 | |||
|
|
cfc670af7e | ||
|
|
de32bced58 | ||
|
|
22748796af | ||
|
|
fd42fd68ee | ||
|
|
fc721af480 | ||
|
|
2cfb90aed6 | ||
| 864de8d07a | |||
|
|
086b489ef7 | ||
|
|
e292bb3022 | ||
|
|
1dc3ffd213 | ||
|
|
cd5dba7b72 | ||
|
|
fec24c3632 | ||
|
|
933e4b6494 | ||
|
|
6b3d23eadd | ||
|
|
c25a23454d | ||
|
|
2932274c33 | ||
|
|
7a90fcb826 | ||
|
|
9d9c4c10cc | ||
|
|
8141e4de09 | ||
|
|
09471cbe8d |
13 changed files with 8 additions and 3080 deletions
|
|
@ -1 +0,0 @@
|
|||
upstart-0.3.9.tar.bz2
|
||||
7
.gitignore
vendored
Normal file
7
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
upstart-0.6.6.tar.gz
|
||||
/initjobs-20101206.tar.gz
|
||||
/upstart-0.6.7.tar.gz
|
||||
/upstart-1.0.tar.gz
|
||||
/upstart-1.1.tar.gz
|
||||
/upstart-1.2.tar.gz
|
||||
/initjobs-20110502.tar.gz
|
||||
21
Makefile
21
Makefile
|
|
@ -1,21 +0,0 @@
|
|||
# Makefile for source rpm: upstart
|
||||
# $Id$
|
||||
NAME := upstart
|
||||
SPECFILE = $(firstword $(wildcard *.spec))
|
||||
|
||||
define find-makefile-common
|
||||
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
|
||||
endef
|
||||
|
||||
MAKEFILE_COMMON := $(shell $(find-makefile-common))
|
||||
|
||||
ifeq ($(MAKEFILE_COMMON),)
|
||||
# attept a checkout
|
||||
define checkout-makefile-common
|
||||
test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
|
||||
endef
|
||||
|
||||
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
|
||||
endif
|
||||
|
||||
include $(MAKEFILE_COMMON)
|
||||
1
dead.package
Normal file
1
dead.package
Normal file
|
|
@ -0,0 +1 @@
|
|||
This package was retired on 2012-08-06 due to no active maintainers for the package.
|
||||
286
events.5
286
events.5
|
|
@ -1,286 +0,0 @@
|
|||
.TH events 5 "April 2008" "Upstart"
|
||||
.\"
|
||||
.SH NAME
|
||||
events \- format of event files used by the upstart init system
|
||||
.\"
|
||||
.SH DESCRIPTION
|
||||
upstart works on the basis of \fBevent\fP files that describe jobs
|
||||
that should be managed. This includes the particulars about what binary
|
||||
or shell script code should executed while the job is running, and
|
||||
which events can cause the job to be started or stopped.
|
||||
|
||||
Event files are stored in the \fI/etc/event.d\fP directory.
|
||||
.\"
|
||||
.SH SYNTAX
|
||||
|
||||
Event files can contain the following stanzaz.
|
||||
|
||||
.TP
|
||||
.BI "exec <command> <arguments>"
|
||||
When the event is started by \fBinit\fR, execute the following arguments.
|
||||
|
||||
Example: exec /bin/dbus-daemon --system
|
||||
|
||||
.TP
|
||||
.BI "script ..."
|
||||
Like \fBexec\fR but instead of executing a single program, execute
|
||||
the following shell code. \fBscript\fR sections are closed with a
|
||||
\fBend script\fR marker.
|
||||
|
||||
Example:
|
||||
.nf
|
||||
script
|
||||
rm -f /var/run/sshd.pid
|
||||
sshd
|
||||
end script
|
||||
.ni
|
||||
|
||||
Only one of \fBexec\fR and \fBscript\fR can be used at a time. If both
|
||||
are bspecifed, \fBexec\fR takes priority.
|
||||
|
||||
.TP
|
||||
.BI pre-start
|
||||
Execute the command/script before actually starting the process.
|
||||
\fBpre-start\fR can be invoked as \fBpre-start exec\fR or \fBpre-start script\fR
|
||||
in the same way that a start action can be handled by either
|
||||
\fBexec\fR or \fBscript\fR.
|
||||
|
||||
.TP
|
||||
.BI post-start
|
||||
Execute the command/script after starting the process.
|
||||
The format is similar to \fBpre-start\fR.
|
||||
|
||||
.TP
|
||||
.BI pre-stop
|
||||
Execute the command/script before stopping the process.
|
||||
The format is similar to \fBpre-start\fR.
|
||||
|
||||
.TP
|
||||
.BI post-stop
|
||||
Execute the command/script after stopping the process.
|
||||
The format is similar to \fBpre-start\fR.
|
||||
|
||||
.TP
|
||||
.BI "start on <event>"
|
||||
Describes on what condition to start this job. Without this
|
||||
section, the job can only be manually started with the
|
||||
\fBinitctl(8)\fR command.
|
||||
|
||||
Examples:
|
||||
.nf
|
||||
start on startup
|
||||
This starts immediately after boot.
|
||||
|
||||
start on stopped rc3
|
||||
This starts when the 'rc3' event has stopped.
|
||||
.ni
|
||||
|
||||
Events are matched via globbing. So a stanza of the form
|
||||
.nf
|
||||
start on runlevel [2345]
|
||||
.ni
|
||||
would match any of runlevels 2, 3, 4, or 5.
|
||||
|
||||
.TP
|
||||
.BI "stop on <event>"
|
||||
Describes on what condition to stop this job. Without this
|
||||
section, the job can only be manually stopped with the
|
||||
\fBinitctl\fR command.
|
||||
|
||||
Examples:
|
||||
.nf
|
||||
stop on runlevel 0
|
||||
This stops the job when runlevel 0 is entered.
|
||||
|
||||
stop on stopping dbus ok
|
||||
This stops the job when the 'dbus' job is stopped.
|
||||
.ni
|
||||
|
||||
Events are matched via globbing. So a stanza of the form
|
||||
.nf
|
||||
stop on runlevel [!5]
|
||||
.ni
|
||||
would match any runlevel other than 5.
|
||||
|
||||
.TP
|
||||
.BI daemon
|
||||
Sets the daemon flag for the job. This means that the job will
|
||||
fork in the background and that its PID needs to be obtained.
|
||||
|
||||
.TP
|
||||
.BI respawn
|
||||
This sets the daemon, service, and respawn falgs for the job.
|
||||
The respawn flag means that the process will be restarted when
|
||||
it ends.
|
||||
|
||||
.TP
|
||||
.BI "respawn limit [count [timeout]]"
|
||||
This configures respawn limits. Respawn limits only apply
|
||||
if the \fBrespawn\fR flag is set for the job; setting a limit
|
||||
does not automatically set respawning capability. If the
|
||||
process is respawned more than \fIcount\fR times within an
|
||||
interval of \fItimeout\fR seconds, the job will be stopped
|
||||
automatically, andn ot restarted. The limit defaults to 10
|
||||
times within 5 seconds.
|
||||
|
||||
Example: respawn limit 10 120
|
||||
|
||||
This sets the limit for respawn to ten times within two
|
||||
minutes, the historical behavior for System V init.
|
||||
|
||||
.TP
|
||||
.BI service
|
||||
\fBservice\fR means that the job has reached its goal when running.
|
||||
\fBservice\fR is implied by the \fBrespawn\fR flag.
|
||||
|
||||
.TP
|
||||
.BI instance
|
||||
\fBinstance\fR means that the job starts new instances every time
|
||||
it is started, even if there is another instance running. It
|
||||
is the converse of \fBdaemon\fR.
|
||||
|
||||
.TP
|
||||
.BI "kill timeout <time>"
|
||||
Sets the time to wait between sending TERM and KILL signals to
|
||||
\fItime\fR seconds.
|
||||
|
||||
.TP
|
||||
.BI "normal exit <status>"
|
||||
When used with \fBespawn\fR any exit codes denoted in \fIstatus\fR will
|
||||
prevent a respawn of the process.
|
||||
|
||||
.TP
|
||||
.BI "console {logged|output|owner|none}"
|
||||
Describes what to do with the job's output. Valid values are:
|
||||
|
||||
.I logged
|
||||
Redirect to logger. (the default setting)
|
||||
|
||||
.I output
|
||||
Direct to the current stdout
|
||||
|
||||
.I owner
|
||||
The process becomes the owner of the console, allowing it to
|
||||
receive signals from the keyboard
|
||||
|
||||
.I none
|
||||
Output is redirected to /dev/null
|
||||
|
||||
.TP
|
||||
.BI "env <name>=<value>"
|
||||
Sets an environment variable for the job.
|
||||
|
||||
Example: env LD_LIBRARY_PATH=/opt/app/lib
|
||||
|
||||
.TP
|
||||
.BI "umask <umask>"
|
||||
Sets the umask of the job to \fIumask\fR.
|
||||
|
||||
Example: umask 0755
|
||||
|
||||
.TP
|
||||
.BI "nice <value>"
|
||||
Sets the nice level of the job to \fIvalue\fR.
|
||||
|
||||
Example: nice 5
|
||||
|
||||
.TP
|
||||
.BI "chroot <path>"
|
||||
Changes the job's root directory to \fIpath\fR.
|
||||
|
||||
Example: chroot /var/empty
|
||||
|
||||
.TP
|
||||
.BI "chdir <path>"
|
||||
Changes the working directory of the job to \fIpath\fR.
|
||||
|
||||
Example: chdir /var/tmp
|
||||
|
||||
.TP
|
||||
.BI "limit {as|core|cpu|data|fsize|memlock|msgqueue|nice|nofile|nproc|rss|rtprio|sigpending|stack} {unlimited|<value>}"
|
||||
Changes the limit of the process to whatever is specfied.
|
||||
|
||||
Examples:
|
||||
.nf
|
||||
limit nproc 10
|
||||
limit core unlimited
|
||||
.ni
|
||||
|
||||
.TP
|
||||
.BI "description <text>"
|
||||
Describes the job. Not currently used by any \fBinit(8)\fR tools.
|
||||
|
||||
Example: descripton "This is a test job."
|
||||
|
||||
.TP
|
||||
.BI "author <text>"
|
||||
Author of the job. Not currently used by any \fBinit(8)\fR tools.
|
||||
Example: author "Obi-wan Kennedy <bidy@whitehouse.gov>"
|
||||
|
||||
.TP
|
||||
.BI "version <version>"
|
||||
Version of the job. Not currently used by any \fBinit(8)\fR tools.
|
||||
Example: version "0.0.0.0.1 test"
|
||||
|
||||
.TP
|
||||
.BI "emits <signals>"
|
||||
Describes signals emitted by the job. Not currently used by
|
||||
any \fBinit(8)\fR tools. For more information on signals, see the
|
||||
\fBinitctl(8)\fR man page and the \fBemit\fR option.
|
||||
|
||||
Example: emits spam egg ham
|
||||
.\"
|
||||
.SH EVENTS
|
||||
A wide array of events can be emitted by the system (see
|
||||
\fBinitctl(8)\fR) but the following events are generated by
|
||||
upstart itself, or are usually seen on a typical install.
|
||||
|
||||
.TP
|
||||
.BI "stalled"
|
||||
No jobs are running and no events are pending.
|
||||
|
||||
.TP
|
||||
.BI "control-alt-delete"
|
||||
Control-Alt-Delete has been pressed.
|
||||
|
||||
.TP
|
||||
.BI "kbdrequest"
|
||||
A kbdrequest event has occurred.
|
||||
|
||||
.TP
|
||||
.BI "power-status-changed"
|
||||
Init received SIGPWR.
|
||||
|
||||
.TP
|
||||
.BI "starting <job>"
|
||||
The given job is being started.
|
||||
|
||||
.TP
|
||||
.BI "started <job>"
|
||||
The given job has successfully been started.
|
||||
|
||||
.TP
|
||||
.BI "stopping <job>"
|
||||
The given job is being stopped.
|
||||
|
||||
.TP
|
||||
.BI "stopped <job>"
|
||||
The given job has been stopped successfully.
|
||||
|
||||
.TP
|
||||
.BI "startup"
|
||||
Emitted when the system boots.
|
||||
|
||||
.TP
|
||||
.BI "runlevel <runlevel>"
|
||||
Init has been asked to move to the given runlevel.
|
||||
.\"
|
||||
.SH FILES
|
||||
.I /etc/event.d
|
||||
The directory where event files are stored.
|
||||
.\"
|
||||
.SH SEE ALSO
|
||||
.BR initctl (8)
|
||||
.BR telinit (8)
|
||||
.BR init (8)
|
||||
.BR http://upstart.ubuntu.com/getting-started.html
|
||||
1
sources
1
sources
|
|
@ -1 +0,0 @@
|
|||
794208083d405ece123ad59a02f3e233 upstart-0.3.9.tar.bz2
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
diff -urN upstart-0.3.9/configure upstart-0.3.9-adj/configure
|
||||
--- upstart-0.3.9/configure 2007-10-11 17:12:41.000000000 -0400
|
||||
+++ upstart-0.3.9-adj/configure 2008-04-03 11:22:20.000000000 -0400
|
||||
@@ -732,7 +732,7 @@
|
||||
PACKAGE_TARNAME='upstart'
|
||||
PACKAGE_VERSION='0.3.9'
|
||||
PACKAGE_STRING='upstart 0.3.9'
|
||||
-PACKAGE_BUGREPORT='upstart-devel@lists.ubuntu.com'
|
||||
+PACKAGE_BUGREPORT='fedora-devel-list@redhat.com'
|
||||
|
||||
ac_unique_file="init/main.c"
|
||||
gt_needs=
|
||||
@@ -1574,7 +1574,7 @@
|
||||
Use these variables to override the choices made by `configure' or to help
|
||||
it to find libraries and programs with nonstandard names/locations.
|
||||
|
||||
-Report bugs to <upstart-devel@lists.ubuntu.com>.
|
||||
+Report bugs to <fedora-devel-list@redhat.com>.
|
||||
_ACEOF
|
||||
ac_status=$?
|
||||
fi
|
||||
diff -urN upstart-0.3.9/configure.ac upstart-0.3.9-adj/configure.ac
|
||||
--- upstart-0.3.9/configure.ac 2007-10-11 17:11:27.000000000 -0400
|
||||
+++ upstart-0.3.9-adj/configure.ac 2008-04-03 11:22:20.000000000 -0400
|
||||
@@ -1,7 +1,7 @@
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_PREREQ(2.60)
|
||||
-AC_INIT([upstart], [0.3.9], [upstart-devel@lists.ubuntu.com])
|
||||
+AC_INIT([upstart], [0.3.9], [fedora-devel-list@redhat.com])
|
||||
AC_COPYRIGHT([[Copyright © 2007 Canonical Ltd.]])
|
||||
AC_CONFIG_SRCDIR([init/main.c])
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
|
|
@ -1,56 +0,0 @@
|
|||
diff -up upstart-0.3.9/compat/sysv/reboot.c.foo upstart-0.3.9/compat/sysv/reboot.c
|
||||
--- upstart-0.3.9/compat/sysv/reboot.c.foo 2008-02-15 16:52:30.000000000 -0500
|
||||
+++ upstart-0.3.9/compat/sysv/reboot.c 2008-02-15 17:47:37.000000000 -0500
|
||||
@@ -36,6 +36,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
+#include <utmp.h>
|
||||
|
||||
#include <linux/if.h>
|
||||
#include <linux/hdreg.h>
|
||||
@@ -158,12 +159,31 @@ static NihOption options[] = {
|
||||
NIH_OPTION_LAST
|
||||
};
|
||||
|
||||
+static char get_runlevel(void)
|
||||
+{
|
||||
+ struct utmp utmp, *lvl;
|
||||
+ char *rl, runlevel = 0;
|
||||
+
|
||||
+ if ((rl = getenv("RUNLEVEL")) != NULL)
|
||||
+ return *rl;
|
||||
+
|
||||
+ memset(&utmp, 0, sizeof(utmp));
|
||||
+ utmp.ut_type = RUN_LVL;
|
||||
+ setutent();
|
||||
+ lvl = getutid(&utmp);
|
||||
+ if (lvl)
|
||||
+ runlevel = lvl->ut_pid % 256;
|
||||
+ endutent();
|
||||
+ return runlevel;
|
||||
+}
|
||||
+
|
||||
|
||||
int
|
||||
main (int argc,
|
||||
char *argv[])
|
||||
{
|
||||
char **args;
|
||||
+ char level;
|
||||
int mode;
|
||||
|
||||
nih_main_init (argv[0]);
|
||||
@@ -211,6 +231,12 @@ main (int argc,
|
||||
|
||||
if (exit_only)
|
||||
exit (0);
|
||||
+
|
||||
+ level = get_runlevel();
|
||||
+ if (level) {
|
||||
+ if (level == '0' || level == '6')
|
||||
+ force = TRUE;
|
||||
+ }
|
||||
|
||||
/* Normally we just exec shutdown, which notifies everyone and
|
||||
* signals init.
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
diff -up upstart-0.3.9/upstart/wire.c.foo upstart-0.3.9/upstart/wire.c
|
||||
--- upstart-0.3.9/upstart/wire.c.foo 2008-02-01 13:35:33.000000000 -0500
|
||||
+++ upstart-0.3.9/upstart/wire.c 2008-02-01 13:35:33.000000000 -0500
|
||||
@@ -28,6 +28,7 @@
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
+#include <limits.h>
|
||||
|
||||
#include <nih/macros.h>
|
||||
#include <nih/alloc.h>
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
=== modified file 'nih/file.c'
|
||||
--- nih/file.c 2007-06-03 12:32:56 +0000
|
||||
+++ nih/file.c 2008-03-17 02:47:17 +0000
|
||||
@@ -375,6 +375,18 @@
|
||||
if (ptr && (! strncmp (ptr, ".dpkg-", 6)))
|
||||
return TRUE;
|
||||
|
||||
+ /* Matches rpm temp files */
|
||||
+ if (ptr && (! strncmp (ptr, ".rpmsave",9)))
|
||||
+ return TRUE;
|
||||
+ if (ptr && (! strncmp (ptr, ".rpmorig",9)))
|
||||
+ return TRUE;
|
||||
+ if (ptr && (! strncmp (ptr, ".rpmnew",8)))
|
||||
+ return TRUE;
|
||||
+
|
||||
+ /* More rpm temp file matching */
|
||||
+ ptr = strrchr (path, ';');
|
||||
+ if (ptr && strspn (ptr + 1, "abcdefABCDEF0123456789") == 8 && !ptr[9])
|
||||
+ return TRUE;
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
@ -1,110 +0,0 @@
|
|||
diff -urN upstart-0.3.9-old/compat/sysv/telinit.c upstart-0.3.9/compat/sysv/telinit.c
|
||||
--- upstart-0.3.9-old/compat/sysv/telinit.c 2008-04-09 00:52:06.000000000 -0400
|
||||
+++ upstart-0.3.9/compat/sysv/telinit.c 2008-04-09 01:02:39.000000000 -0400
|
||||
@@ -113,6 +113,11 @@
|
||||
NULL, UPSTART_INIT_DAEMON,
|
||||
UPSTART_EVENT_EMIT, "runlevel", args, NULL));
|
||||
break;
|
||||
+ case 'u':
|
||||
+ NIH_MUST (message = upstart_message_new (
|
||||
+ NULL, UPSTART_INIT_DAEMON,
|
||||
+ UPSTART_RESTART, NULL));
|
||||
+ break;
|
||||
default:
|
||||
/* Ignore other arguments */
|
||||
exit (0);
|
||||
diff -urN upstart-0.3.9-old/init/control.c upstart-0.3.9/init/control.c
|
||||
--- upstart-0.3.9-old/init/control.c 2008-04-09 00:52:06.000000000 -0400
|
||||
+++ upstart-0.3.9/init/control.c 2008-04-09 01:01:41.000000000 -0400
|
||||
@@ -29,6 +29,7 @@
|
||||
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
+#include <signal.h>
|
||||
#include <fnmatch.h>
|
||||
|
||||
#include <nih/macros.h>
|
||||
@@ -52,6 +53,8 @@
|
||||
static void control_error_handler (void *data, NihIo *io);
|
||||
static int control_version_query (void *data, pid_t pid,
|
||||
UpstartMessageType type);
|
||||
+static int control_restart (void *data, pid_t pid,
|
||||
+ UpstartMessageType type);
|
||||
static int control_log_priority (void *data, pid_t pid,
|
||||
UpstartMessageType type,
|
||||
NihLogLevel priority);
|
||||
@@ -102,6 +105,8 @@
|
||||
static UpstartMessage message_handlers[] = {
|
||||
{ -1, UPSTART_VERSION_QUERY,
|
||||
(UpstartMessageHandler)control_version_query },
|
||||
+ { -1, UPSTART_RESTART,
|
||||
+ (UpstartMessageHandler)control_restart },
|
||||
{ -1, UPSTART_PUSH_TTY,
|
||||
(UpstartMessageHandler)control_push_tty },
|
||||
{ -1, UPSTART_POP_TTY,
|
||||
@@ -319,6 +324,32 @@
|
||||
}
|
||||
|
||||
/**
|
||||
+ * control_restart:
|
||||
+ * @data: data pointer,
|
||||
+ * @pid: origin process id,
|
||||
+ * @type: message type received.
|
||||
+ *
|
||||
+ * This function is called when another process on the system asks us to
|
||||
+ * re-execute
|
||||
+ *
|
||||
+ * Returns: zero on success, negative value on raised error.
|
||||
+ **/
|
||||
+static int
|
||||
+control_restart (void *data,
|
||||
+ pid_t pid,
|
||||
+ UpstartMessageType type)
|
||||
+{
|
||||
+ nih_assert (pid > 0);
|
||||
+ nih_assert (type == UPSTART_RESTART);
|
||||
+
|
||||
+ nih_info (_("Control request to restart daemon"));
|
||||
+
|
||||
+ kill(getpid(), SIGTERM);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+/**
|
||||
* control_push_tty:
|
||||
* @data: data pointer,
|
||||
* @pid: origin process id,
|
||||
diff -urN upstart-0.3.9-old/upstart/message.c upstart-0.3.9/upstart/message.c
|
||||
--- upstart-0.3.9-old/upstart/message.c 2008-04-09 00:52:06.000000000 -0400
|
||||
+++ upstart-0.3.9/upstart/message.c 2008-04-09 00:55:03.000000000 -0400
|
||||
@@ -259,6 +259,8 @@
|
||||
switch (type) {
|
||||
case UPSTART_NO_OP:
|
||||
break;
|
||||
+ case UPSTART_RESTART:
|
||||
+ break;
|
||||
case UPSTART_VERSION_QUERY:
|
||||
break;
|
||||
case UPSTART_POP_TTY:
|
||||
@@ -564,6 +566,9 @@
|
||||
case UPSTART_VERSION_QUERY:
|
||||
ret = handler (data, cred.pid, type);
|
||||
break;
|
||||
+ case UPSTART_RESTART:
|
||||
+ ret = handler (data, cred.pid, type);
|
||||
+ break;
|
||||
case UPSTART_POP_TTY:
|
||||
ret = handler (data, cred.pid, type);
|
||||
break;
|
||||
diff -urN upstart-0.3.9-old/upstart/message.h upstart-0.3.9/upstart/message.h
|
||||
--- upstart-0.3.9-old/upstart/message.h 2008-04-09 00:52:06.000000000 -0400
|
||||
+++ upstart-0.3.9/upstart/message.h 2008-04-09 00:55:58.000000000 -0400
|
||||
@@ -67,6 +67,7 @@
|
||||
UPSTART_NO_OP = 0x0000,
|
||||
UPSTART_VERSION_QUERY = 0x0001,
|
||||
UPSTART_LOG_PRIORITY = 0x0002,
|
||||
+ UPSTART_RESTART = 0x0005,
|
||||
UPSTART_VERSION = 0x0010,
|
||||
UPSTART_PUSH_TTY = 0x0011,
|
||||
UPSTART_POP_TTY = 0x0012,
|
||||
File diff suppressed because it is too large
Load diff
150
upstart.spec
150
upstart.spec
|
|
@ -1,150 +0,0 @@
|
|||
Name: upstart
|
||||
Version: 0.3.9
|
||||
Release: 17%{?dist}
|
||||
Summary: An event-driven init system
|
||||
|
||||
Group: System Environment/Base
|
||||
License: GPLv2+
|
||||
URL: http://upstart.ubuntu.com
|
||||
Source0: http://upstart.ubuntu.com/download/0.3/upstart-%{version}.tar.bz2
|
||||
Source1: events.5
|
||||
Patch0: upstart-gcc43.patch
|
||||
Patch1: upstart-force-on-shutdown-reboot.patch
|
||||
Patch2: upstart-tty-stack.patch
|
||||
Patch3: upstart-rpm.patch
|
||||
Patch4: upstart-fedora-buglist.patch
|
||||
Patch5: upstart-telinit-u.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
|
||||
BuildRequires: gettext
|
||||
|
||||
%description
|
||||
Upstart is an event-based replacement for the /sbin/init daemon which
|
||||
handles starting of tasks and services during boot, stopping them
|
||||
during shutdown and supervising them while the system is running.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2
|
||||
%patch3
|
||||
%patch4 -p1
|
||||
%patch5 -p1
|
||||
|
||||
%build
|
||||
%configure --enable-compat=sysv --sbindir=/sbin --libdir=/%{_lib}
|
||||
make %{?_smp_mflags}
|
||||
|
||||
%install
|
||||
rm -rf %{buildroot}
|
||||
make install DESTDIR=%{buildroot}
|
||||
|
||||
mkdir -p %{buildroot}/%{_mandir}/man5
|
||||
install -m 644 %{SOURCE1} %{buildroot}/%{_mandir}/man5/events.5
|
||||
|
||||
# libupstart and libnih aren't shipped
|
||||
rm -f %{buildroot}/%{_lib}/libupstart.*
|
||||
rm -f %{buildroot}/%{_lib}/libnih.*
|
||||
rm -f %{buildroot}/%{_includedir}/libnih.h
|
||||
rm -f %{buildroot}/%{_includedir}/libupstart.h
|
||||
rm -rf %{buildroot}/%{_includedir}/nih
|
||||
rm -rf %{buildroot}/%{_includedir}/upstart
|
||||
rm -rf %{buildroot}/%{_datadir}/aclocal/compiler.m4
|
||||
rm -rf %{buildroot}/%{_datadir}/aclocal/linker.m4
|
||||
rm -rf %{buildroot}/%{_datadir}/aclocal/misc.m4
|
||||
|
||||
%find_lang %{name}
|
||||
|
||||
%clean
|
||||
rm -rf %{buildroot}
|
||||
|
||||
%files -f %{name}.lang
|
||||
%defattr(-,root,root,-)
|
||||
%doc AUTHORS
|
||||
%doc COPYING
|
||||
%doc NEWS
|
||||
%doc README
|
||||
%doc TODO
|
||||
%doc HACKING
|
||||
%{_sysconfdir}/event.d/
|
||||
%config(noreplace) %{_sysconfdir}/event.d/logd
|
||||
/sbin/halt
|
||||
/sbin/init
|
||||
/sbin/initctl
|
||||
/sbin/logd
|
||||
/sbin/poweroff
|
||||
/sbin/reboot
|
||||
/sbin/runlevel
|
||||
/sbin/shutdown
|
||||
/sbin/start
|
||||
/sbin/status
|
||||
/sbin/stop
|
||||
/sbin/telinit
|
||||
%{_mandir}/man5/events.5.gz
|
||||
%{_mandir}/man8/halt.8.gz
|
||||
%{_mandir}/man8/init.8.gz
|
||||
%{_mandir}/man8/initctl.8.gz
|
||||
%{_mandir}/man8/logd.8.gz
|
||||
%{_mandir}/man8/poweroff.8.gz
|
||||
%{_mandir}/man8/reboot.8.gz
|
||||
%{_mandir}/man8/runlevel.8.gz
|
||||
%{_mandir}/man8/shutdown.8.gz
|
||||
%{_mandir}/man8/start.8.gz
|
||||
%{_mandir}/man8/status.8.gz
|
||||
%{_mandir}/man8/stop.8.gz
|
||||
%{_mandir}/man8/telinit.8.gz
|
||||
|
||||
%changelog
|
||||
* Wed Apr 09 2008 Casey Dahlin <cjdahlin@ncsu.edu> - 0.3.9-17
|
||||
- Added list of stock events to events(5)
|
||||
|
||||
* Tue Apr 08 2008 Casey Dahlin <cjdahlin@ncsu.edu> - 0.3.9-16
|
||||
- Add telinit u support
|
||||
|
||||
* Fri Apr 04 2008 Bill Nottingham <notting@redhat.com> - 0.3.9-15
|
||||
- Add a events(5) manpage that describes event syntax
|
||||
|
||||
* Thu Apr 03 2008 Casey Dahlin <cjdahlin@ncsu.edu> - 0.3.9-14
|
||||
- Change bug report email address to fedora-devel-list@redhat.com
|
||||
|
||||
* Thu Mar 14 2008 Bill Nottingham <notting@redhat.com> - 0.3.9-13
|
||||
- Ignore rpm temporary files of the foo;<somehex> format
|
||||
- Make ignores of .rpm{new,orig,save} match only at the end of the name
|
||||
|
||||
* Wed Mar 13 2008 Bill Nottingham <notting@redhat.com> - 0.3.9-12
|
||||
- forgot about rpmorig too (ugh)
|
||||
|
||||
* Wed Mar 13 2008 Casey Dahlin <cjdahlin@ncsu.edu> - 0.3.9-11
|
||||
- Make logd a noreplace
|
||||
|
||||
* Wed Mar 13 2008 Casey Dahlin <cjdahlin@ncsu.edu> - 0.3.9-10
|
||||
- Add patch to ignore .rpm{new,save} files
|
||||
|
||||
* Sun Mar 03 2008 Casey Dahlin <cjdahlin@ncsu.edu> - 0.3.9-9
|
||||
- Remove automake dependency, build Makefile.in changes into patch
|
||||
|
||||
* Sun Mar 03 2008 Casey Dahlin <cjdahlin@ncsu.edu> - 0.3.9-8
|
||||
- Run automake after patching
|
||||
|
||||
* Sun Mar 03 2008 Casey Dahlin <cjdahlin@ncsu.edu> - 0.3.9-7
|
||||
- Added BuildRequires: automake
|
||||
|
||||
* Sun Mar 03 2008 Casey Dahlin <cjdahlin@ncsu.edu> - 0.3.9-6
|
||||
- Added patch to allow runtime tty changes
|
||||
|
||||
* Fri Feb 15 2008 Casey Dahlin <cjdahlin@ncsu.edu> - 0.3.9-5
|
||||
- Added patch to imply --force on runlevels 0 and 6
|
||||
|
||||
* Wed Feb 06 2008 Casey Dahlin <cjdahlin@ncsu.edu> - 0.3.9-4
|
||||
- Patched for GCC 4.3
|
||||
|
||||
* Thu Jan 31 2008 Casey Dahlin <cjdahlin@ncsu.edu> - 0.3.9-3
|
||||
- Added AUTHORS, COPYING, etc.
|
||||
- Made config --libdir option relative
|
||||
|
||||
* Mon Jan 21 2008 Casey Dahlin <cjdahlin@ncsu.edu> - 0.3.9-2
|
||||
- Remove libnih and libupstart
|
||||
|
||||
* Sun Jan 13 2008 Casey Dahlin <cjdahlin@ncsu.edu> - 0.3.9-1
|
||||
- Initial packaging
|
||||
Loading…
Add table
Add a link
Reference in a new issue