Bug 438444 - upstart - 'telinit 1' is not doing anything even close to advertised
Summary: upstart - 'telinit 1' is not doing anything even close to advertised
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: initscripts
Version: rawhide
Hardware: All
OS: Linux
low
high
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 441489 (view as bug list)
Depends On:
Blocks: F9Blocker
TreeView+ depends on / blocked
 
Reported: 2008-03-20 21:59 UTC by Michal Jaegermann
Modified: 2014-03-17 03:13 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-04-08 05:16:00 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Michal Jaegermann 2008-03-20 21:59:11 UTC
Description of problem:

'man telinit' says:

.... or 1  to  bring  the  system down into single-user mode

AFAICS after 'telinit 1' most of things which were running are
still running.  A rough check with scripts in /etc/init.d/ quickly
gives:

acpid (pid 1958) is running...
anacron (pid 2223) is running...
atd (pid 2048) is running...
auditd (pid 1861) is running...
automount (pid 1943) is running...
Avahi daemon is running
crond (pid 2030) is running...
cupsd (pid 2071) is running...
gpm (pid 2023) is running...
hald (pid 2078) is running...
dbus-daemon (pid 1911) is running...
rpc.statd (pid 1802) is running...
ntpd (pid 1981) is running...
privoxy (pid 2016) is running...
rpcbind (pid 1785) is running...
rpc.idmapd (pid 1836) is running...
rsyslogd (pid 1925) is running...
sendmail (pid  2000) is running...
sm-client (pid  2008) is running...
smartd (pid 2245) is running...
sshd (pid 4048 4046 3287 1967) is running...
xfs (pid 2042) is running...
xinetd (pid 1974) is running...

It is true that I cannot login as a non-root on a local console;
but there is nothing which stops me doing that over a network.
That is a mighty strange "single-user mode".

One also can read in 'man telinit' about "S or s" that
"you  probably won’t want that".  The only difference I can
see between 'telinit 1' and 'telinit s' that in the first case
"Tellinig INIT to go to single user mode." is printed, but
not when the second form is used

Version-Release number of selected component (if applicable):
upstart-0.3.9-9.fc9

How reproducible:
always

Comment 1 Scott James Remnant 2008-04-07 22:04:54 UTC
This sounds like a difference between runlevel configuration in Ubuntu and
Fedora?  In Ubuntu (and Debian) rc1.d contains K scripts for each of the
services found in rc2-5, and the final script which issues "telinit S" to
actually put the system into single-user mode

Comment 2 Bill Nottingham 2008-04-07 22:17:39 UTC
Fedora's the same way.

Comment 3 Bill Nottingham 2008-04-08 05:15:44 UTC
Will be fixed in initscripts-8.69-1.

http://git.fedorahosted.org/git/?p=initscripts.git;a=commit;h=d61552366c960cae6f5a52d493185ec8d8e716cd

Comment 4 Casey Dahlin 2008-04-08 14:16:07 UTC
*** Bug 441489 has been marked as a duplicate of this bug. ***

Comment 5 Michal Jaegermann 2008-04-08 19:26:37 UTC
> Will be fixed in initscripts-8.69-1.

Well, with initscripts-8.69-1 installed I still see after 'telinit 1'
'/usr/sbin/console-kit-daemon' and 'anacron -s' running.  The second,
in particular, is somewhat disconcerting as it is not obvious what
it may do and when.

Also what on earth is the following process hanging there:

root      3072  0.0  0.2  11072  1096 tty1     Ss   12:59   0:00 /bin/sh -e -c
?runlevel --set S >/dev/null || true??/bin/bash???runlevel=$(/bin/awk -F ':' '$3
== "initdefault" { print $2 }' /etc/inittab)??[ -z "$runlevel" ] &&
runlevel="3"??telinit $runlevel? /bin/sh S

All of this is surely in a much better shape (thanks!) but is it truly
fixed?

Comment 6 Bill Nottingham 2008-04-08 19:33:01 UTC
(In reply to comment #5)
> > Will be fixed in initscripts-8.69-1.
> 
> Well, with initscripts-8.69-1 installed I still see after 'telinit 1'
> '/usr/sbin/console-kit-daemon' and 'anacron -s' running.  The second,
> in particular, is somewhat disconcerting as it is not obvious what
> it may do and when.

Those would be bugs in the particular packages.

> Also what on earth is the following process hanging there:
> 
> root      3072  0.0  0.2  11072  1096 tty1     Ss   12:59   0:00 /bin/sh -e -c
> ?runlevel --set S >/dev/null || true??/bin/bash???runlevel=$(/bin/awk -F ':' '$3
> == "initdefault" { print $2 }' /etc/inittab)??[ -z "$runlevel" ] &&
> runlevel="3"??telinit $runlevel? /bin/sh S

That's the thing that starts the shell. Sort of a consequence as to how
upstart executes it.


Comment 7 Michal Jaegermann 2008-04-08 19:47:08 UTC
> Those would be bugs in the particular packages.
In that case I better make sure that corresponding reports are filed.

Comment 8 Bill Nottingham 2008-04-08 21:11:44 UTC
Note that this only really applies to things started by init scripts; it's
impossible to track everything that may have been started at some point.


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