Bug 435533 - 'telinit u' doesn't do anything
Summary: 'telinit u' doesn't do anything
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: upstart
Version: rawhide
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Casey Dahlin
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: F9Target
TreeView+ depends on / blocked
 
Reported: 2008-03-01 04:26 UTC by Bill Nottingham
Modified: 2014-06-18 08:46 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-04-09 20:10:02 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Bill Nottingham 2008-03-01 04:26:49 UTC
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-foo/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.
+
+.I RUNLEVEL
+may also be
+.BR U " or " u
+which will cause init to re-execute itself.
 .\"
 .SH NOTES
 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 @@
 				  NULL, UPSTART_INIT_DAEMON,
 				  UPSTART_EVENT_EMIT, "runlevel", args, NULL));
 		break;
+	case 'U':
+	case 'u':
+		exit(kill(1, SIGTERM));
 	default:
 		/* 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):

upstart-0.3.9-5.fc9.x86_64

Comment 1 Casey Dahlin 2008-03-04 19:23:28 UTC
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 05:18:40 UTC
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 14:13:50 UTC
Build as normal, and send a request to rel-eng 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 20:10:02 UTC
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.