Re: itp: static bins / resolving static debian issues
On Sat, Aug 21, 1999 at 11:19:25AM -0400, Steve Willer wrote:
> > sulogin is needed in case you switch runlevels, dropping to single
> > user mode without rebooting, via a direct call to init.
>
> I think you can do this without sulogin. Use the built-in 'ed' or 'echo'
> to output a runlevel to /etc/initrunlvl, then send SIGHUP to init
> (remember, kill and ps are built-in to sash as well). If you just want to
> reboot, send SIGINT to pretend ctrl-alt-del. I haven't tried these yet,
> but the init man page says you can do it...
I am assuming that you have a way to send messages to INIT. You might
want "telinit" to be static as well, or built into something, or
whatever. Not like it will be frequently in memory.
sulogin isn't used to get into single user mode, it practically *is*
single user mode. This is in your inittab as the *only* thing to do
in single user mode (only entry for the 'S' runlevel):
# What to do in single-user mode.
~:S:wait:/sbin/sulogin
You will see this, if it's statically linked (and some error message
if it's dynamically linked and dynamics are broken):
Give root password for system maintenance
(or type Control-D for normal startup):
Actually this raises another point: you probably want the static shell
to be root's, since sulogin doesn't give you a choice about using
the alternate user.
So you probably want to do it the way the BSD's have:
root:0:0:... has static /bin/sh for emergency
toor:0:0:... has /bin/bash for convenience
Justin
Reply to: