Red Hat Bugzilla – Bug 1664
going to runlevel 1 won't run any scripts in /etc/rc.d/rc1.d
Last modified: 2014-03-16 22:09:10 EDT
You may think: but that's the whole point, we shouldn't run
any daemons in single user mode.
- because you don't set the keytables in rc.sysinit (like
you should because if fsck fails rc.sysinit spawns a shell
and non US users then have to fix their system with the
wrong keymap), booting linux with "linux single" won't
load the keymap even after you add RL 1 to keytable's
- if people run a daemon like watchdog with the
kernel softdog module and with the kernel compiled
NO_WAY_OUT mode, going to single user mode
kills watchdog, and it doesn't get restarted, even if
its chkconfig line says that it should run in RL 1.
The end result is that the kernel does a hard reboot after
I agree that you don't support watchdog (I'm the RPM
maintainer), but I hope you'll agree that RH needs some way
to run some scripts from RL 1.
The way you can fix this is by modifying
/etc/rc.d/init.d/single to not do exec init -t1 S, and have
another script that does that, but with a S99 link in rc0.d,
not a S00 one.
I hope it's not too late for this to go in 6.0
- keytable can't necessarily be run after fsck fails, because
it requires /usr to be mounted somewhere.
As for the single-user mode, I'll look at it.
I am aware of the /usr not mounted issue and keytables, please see
the bottom of bug 1146 (sorry I should have referenced it here).
In a nutshell, I recommend to copy the selected keymap to
/etc/sysconfig so that you can activate it before /usr is mounted
The keytable thing has been fixed in initscripts-3.99-1
(and console-tools-*-6); as for running scripts in runlevel
1, it still won't work, as wherever you run init -t1 -S,
it will do a TERM/KILL of all process. We might look into
changing that later, but it's not feasible to do now.
I checked and init -t1 -S will _not_ kill processes that are already
running. This is why the single script does this explicitely (kill -15
and later kill -9).
You also sticked a called to kerneld in there because you had the same
exact need than me: sometimes you do need a couple of daemons running
in single user mode.
Furthermore starbucks contains a bug where it uses action to run the
kill -15 -1, and it kills all but the current process, which includes
the single script, so it never gets to finish.
Please have a look at my version of this script (Emailed and linked
to this bug). It removes the "action"s so that the script doesn't kill
itself, and it starts other scripts that are in /etc/rc.d/rc1.d
------- Email Received From Marc Merlin <firstname.lastname@example.org> 04/13/99 04:56 -------
fixed in initscripts-4.11.