Bug 435533 - 'telinit u' doesn't do anything
'telinit u' doesn't do anything
Product: Fedora
Classification: Fedora
Component: upstart (Show other bugs)
All Linux
low Severity low
: ---
: ---
Assigned To: Casey Dahlin
Fedora Extras Quality Assurance
Depends On:
Blocks: F9Target
  Show dependency treegraph
Reported: 2008-02-29 23:26 EST by Bill Nottingham
Modified: 2014-06-18 04:46 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-04-09 16:10:02 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Bill Nottingham 2008-02-29 23:26:49 EST
Description of problem:

'telinit u' is used by sysvinit to re-exec itself, and it's what our various
%post scripts that need to restart init call.

A simple patch would be:

diff -ru upstart-0.3.9/compat/sysv/man/telinit.8
--- upstart-0.3.9/compat/sysv/man/telinit.8	2007-10-11 15:27:35.000000000 -0400
+++ upstart-0.3.9-foo/compat/sysv/man/telinit.8	2008-02-29 15:48:55.000000000 -0500
@@ -26,6 +26,11 @@
 .BR S " or " s
 which will place the system directly into single-user mode without actually
 stopping processes first, you probably won't want that.
+may also be
+.BR U " or " u
+which will cause init to re-execute itself.
 This tool is provided for compatibility with the traditional System V
diff -ru upstart-0.3.9/compat/sysv/telinit.c upstart-0.3.9-foo/compat/sysv/telinit.c
--- upstart-0.3.9/compat/sysv/telinit.c	2007-10-11 15:27:35.000000000 -0400
+++ upstart-0.3.9-foo/compat/sysv/telinit.c	2008-02-29 15:49:11.000000000 -0500
@@ -113,6 +113,9 @@
 				  UPSTART_EVENT_EMIT, "runlevel", args, NULL));
+	case 'U':
+	case 'u':
+		exit(kill(1, SIGTERM));
 		/* Ignore other arguments */
 		exit (0);

A nicer patch would actually create an upstart message type for it and send the
message, to avoid killing things we shouldn't...

Version-Release number of selected component (if applicable):

Comment 1 Casey Dahlin 2008-03-04 14:23:28 EST
Do we still want upstart bugs to block the upstart tracker?

I can create a new message type without much trouble, but I'd like to get the
rhgb stuff settled down first since there's some similar changes involved.
Comment 2 Casey Dahlin 2008-04-09 01:18:40 EDT
Fixed in 0.3.9-16 . Not sure what voodoo if any I need to throw at koji to build
it in a way that won't violate the freeze/upset releng, but the patch is in cvs
and tagged.
Comment 3 Bill Nottingham 2008-04-09 10:13:50 EDT
Build as normal, and send a request to rel-eng@fedoraproject.org requesting it
be tagged for the final, with a description of what the changes are/bugs fixed, etc.
Comment 5 Casey Dahlin 2008-04-09 16:10:02 EDT
This bug is resolved. Releng will decide whether the fix gets in now or as a
post-release update.

Note You need to log in before you can comment on or make changes to this bug.