[CALUG] How do I get out of X?
Rajiv Gunja
opn.src.rocks at gmail.com
Sun Aug 27 20:33:43 CDT 2006
Dave / James,
On 8/25/06, Dave Dodge <dododge at dododge.net> wrote:
>
> On Fri, Aug 25, 2006 at 10:33:17AM -0400, James Ewing Cottrell 3rd wrote:
> > Which brings up the question: Why TF does "telinit" exist in the first
> > place?
>
> Historical reasons, most likely. "telinit" probably goes back to
> whatever SYSV version introduced the concept of runlevels way back
> when.
>
> > What's wrong with simply typing "init 1"? Nothing!
>
> "telinit" is really the more correct method. "init 1" only works
> because of a quirk in how init and telinit are normally implemented on
> Linux.
Not to be rude or argumentative but here are my thoughts :
If my history of the OS and OS-origin is right, OS was meant to be handled
by more than 1 person. It was designed in those days to be handled by a
group of people from the same department or from different departments. OS
these days have converged all its "management" tasks or "administrative"
tasks to 1 person or 1 group.
Somewhere along the way someone decided to combine them into a
> single executable, and the program picks its operating mode based on
> the pid it gets from the OS.
telinit as the word implies "tell init" was program which could be run by a
"user" (mind you I did not mention root) who has the right privileges to reboot
or bring the system down for maintenance or refresh the running processes.
Someone did not combine these 2, but rather SVR started moving away from it
as it was useless. None the less, they still had that function built into
init to understand telinit command and to do the necessary tasks. While this
was done, other programs were developed to do similar jobs. (reboot,
shutdown and in Linux "control-alt-del")
So when you use "init 1" you're really
> running "telinit 1" even if the binary happens to be called "init".
> As you've seen, it takes telinits's options rather than init's.
Actually it is the other way around. "telinit" TELLS INIT to go to run-level
1. This was done for users who were not "true" UNIX Admins or who did not
have "root".
Done hold your breath and try the "telinit" command on HP-UX or Tru64, it
wont work. As of HP-UX 11 and above there is not support for telinit
command. I am not sure about the history of AIX, but telinit did not exist
on 4.x version, but it is in 5.x, I think the reason being they want their
OS to be as close to Linux as possible.
If you try "init 1" on a system where they are _not_ combined into a
> single program, then it might not have the expected behavior. I don't
> know if there are any such systems; it's conceivable that some "init"
> replacement for Linux, or perhaps a commercial SYSV derivative,
> doesn't have an init that switches to telinit mode automatically.
If someone is still running Ultrix, we might be able to test it out. Last
time I saw Ultrix was in 1999 at an University I worked at in India. Not
sure, if my contacts are still working there or if they are still running
that system. That along with SunOS/Solaris were my first sight and steps
into computer world. (1995)
That said, using init to run telinit normally works on Linux, and the
> manpage (on SLES9 and RHEL4 at least) even documents this
> implementation shortcut. There's probably enough stuff on Linux that
> relies on it that it's unlikely to break.
Again, I would have to say it is the other way around. init is the mother or
parent of all programs. It was thought to be unwise to direct commands to it
directly. So the programmers of Unix wrote a program called "telinit" to
"tell" init what to do.
In my previous job (in India) I used to be an administrator for an
e-commerce firm, where we had all kinds of Unix OSes that you could think
of. We had at least 3 versions of the same OS. We had Solaris as our main
development OS and we did deployments to SCO, Irix, BSDi, FreeBSD, AIX,
Linux, HP-UX and for some reason, we had Macs too running couple of our
end-user products.
Not that I am a great and by-the-book administrator, but I rarely used init
or telinit. The only times I remember using init was to make the server
re-read its inittab file. (Q/q). I am more than happy using the dumbed down
version "shutdown" with all its fancy options.
Press On!!
-GGR
--
Rajiv G Gunja
System Analyst / Engg
SUN / AIX / HPUX / Linux Admin
IM: AOL / Yahoo / MSN : ggvrsn
Skype: rajiv_gunja
-Dave Dodge
> _______________________________________________
> Columbia, Maryland Linux User's Group (CALUG) mailing list
> CALUG Website: http://www.calug.com
> Email postings to: lug at calug.com
> Change your list subscription options:
> http://calug.com/mailman/listinfo/lug
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://calug.com/pipermail/lug/attachments/20060827/7bb36676/attachment.html
More information about the lug
mailing list