Return to BSD News archive
Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!spool.mu.edu!newspump.sol.net!howland.erols.net!news.sprintlink.net!news-peer.sprintlink.net!visi.com!dimensional.com!coopnews.coop.net!news.den.mmc.com!news.vf.lmco.com!bea.atl.lmco.com!atl.lmco.com!rdeal From: rdeal@atl.lmco.com (Richard Deal) Newsgroups: comp.unix.solaris,comp.unix.bsd.misc,comp.unix.internals,comp.unix.osf.osf1 Subject: Re: SysV init [Was: Solaris 2.6] Date: 12 Dec 1996 16:19:26 GMT Organization: ATL Lockheed Martin Lines: 51 Distribution: inet Message-ID: <58pbae$17s3@bea.atl.lmco.com> References: <32986299.AC7@mail.esrin.esa.it> <58invm$s4b@abyss.west.sun.com> <58k7hn$nur@web.nmti.com> <58m3bb$hju@innocence.interface-business.de> <58mmlf$cqm@web.nmti.com> Reply-To: rdeal@atl.lmco.com NNTP-Posting-Host: intrepid.ATL.LMCO.COM X-newsreader: xrn 8.03-beta-17 Xref: euryale.cc.adfa.oz.au comp.unix.solaris:92335 comp.unix.bsd.misc:1794 comp.unix.internals:11592 comp.unix.osf.osf1:17020 In article <58mmlf$cqm@web.nmti.com>, peter@nmti.com (Peter da Silva) writes: > In article <58m3bb$hju@innocence.interface-business.de>, > J Wunsch <joerg_wunsch@interface-business.de> wrote: > > The SysV init has good and bad sides. While i think the idea is not > > too bad, i have yet to see a single SysV that does all state > > transitions right, e.g. where it doesn't tell you ``Starting foobar > > service...'' when you tell it to go down from run-level 3 to 2, or > > ``Stopping mumblefritz'' when you upgrade from S to 1. Interactive and A/UX both were able to kill off processes with no problems > > The semantics of the scripts that are run from inittab need to be separated > from the System V init model itself. Init itself is a very simple program: > all it basically does is run programs on entering states. In a BSD world, > for example in Digital UNIX, it doesn't even complete the shutdown process > itself... rather the script that run on entering run level 0 finishes off > with a call to "halt" or "reboot". Alot of simple programs are run via rc scripts on SysV they should be placed in inittab for init to manage directly. If this was done alot of the problems encounted when changing states would be solved. > > 4 states is plenty. > > 0 (halt), 1 (single user), 2 (multiuser), and 3 (online). > > (call 0 0/6 if you want to use run levels to determine whether you call > halt or reboot) It is nice to be able to define more states if needed. They can be used for demo's etc. The most common use is for backups, if the system can change states properly you can easil make a state that shuts down user processes and makes a backup, or installes all new patches, etc. > > I *do* think that sitinguishing between multiuser and online (multiuser > with networking services and modems online) is a valuable tool for a > system administrator. Networking *clients* should continue to run in > single-user mode (and that's something System V boxes don't tend to > get right, sigh). Both interactive and A/UX did. You could even bring them into single user mode over the network and they would change the console to the pty you ran telinit (or init) from. > > This can all be done without a zillion /etc/rc.d/rc3.d/S00internet files > if you like. Just have /etc/rc.d/rc(0,1,2,3,6) run on entering that state. Actually I preffer the seperate scripts for different software, but if the software is simple a daemon then put it in /etc/inittab and let init manage it. -- #include <std/*> '91 FLT The Butcher Butch Deal rdeal@atl.lmco.com --------------------------------------------------------------------------------