Bug 1664 - going to runlevel 1 won't run any scripts in /etc/rc.d/rc1.d
going to runlevel 1 won't run any scripts in /etc/rc.d/rc1.d
Product: Red Hat Linux
Classification: Retired
Component: initscripts (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
Depends On:
  Show dependency treegraph
Reported: 1999-03-22 02:28 EST by Marc MERLIN
Modified: 2014-03-16 22:09 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 1999-04-13 11:47:17 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 Marc MERLIN 1999-03-22 02:28:28 EST
You may think: but that's the whole point, we shouldn't run
any daemons in single user mode.

Yes, but:
- 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
  chkconfig line
- 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
Comment 1 Bill Nottingham 1999-03-22 11:10:59 EST
- 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.
Comment 2 Marc MERLIN 1999-03-22 12:51:59 EST
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
Comment 3 Bill Nottingham 1999-04-06 12:20:59 EDT
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.
Comment 4 Marc MERLIN 1999-04-13 04:43:59 EDT
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 <marc@merlins.org> 04/13/99 04:56 -------
Comment 5 Bill Nottingham 1999-04-13 11:47:59 EDT
fixed in initscripts-4.11.

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