Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site astrovax.UUCP Path: utzoo!watmath!clyde!floyd!harpo!ihnp4!astrovax!wls From: wls@astrovax.UUCP (William L. Sebok) Newsgroups: net.unix Subject: Re: hacking init Message-ID: <261@astrovax.UUCP> Date: Sun, 1-Apr-84 02:32:23 EST Article-I.D.: astrovax.261 Posted: Sun Apr 1 02:32:23 1984 Date-Received: Sun, 1-Apr-84 08:37:49 EST References: <4481@amd70.UUCP> Organization: Princeton Univ. Astrophysics Lines: 32 Playing with init is one of the scarier things one might do to unix. I keep a backup root on another disk just in case something horrible happens to the normal root, such as the death of init. Another thing I try to do is to make a "disaster recovery" tape, which is a distribution format tape but containing the current system (or at the very least containing disk drivers that recognize the present locations of the disk partition boundaries). There are in fact some changes I would like to see in init. There should be a better way of communicating with init than the sledgehammer approach of editing /etc/ttys and sending it a hangup signal. For one thing one gets no notification when init has reacted to the hangup signal and enabled/disabled logins on the changed line. This can either happen very quickly or can take quite a while if init has to be swapped in on a loaded system. I play this game to use the same lines for dialing in and dialing out. I think that there is no excuse that the distributed Unices (either USG or Berkeley) do not already provide this. . Because of the above problem it is hard to impossible to turn on/off logins cleanly. The best one can do is to put in long sleeps and hope they are enough. On BSD 4.2 it would be nice for init to have some socket to be used to communicate with the outside world. That, I believe, would be the correct, non-hacky way to handle it. Otherwise, a possible hacky change one could make to init would be to let it understand + and - in the positions of /etc/ttys normally occupied by 1 (login enabled) or 0 (login disabled). If one placed a + on the /etc/ttys entry for a terminal and sent a hangup to init, it would enable login on that terminal and replace the + in /etc/ttys with 1 when it finished. Likewise a - in /etc/ttys would cause init to disable the line and replace it with a 0 when finished. -- Bill Sebok Princeton University, Astrophysics {allegra,akgua,burl,cbosgd,decvax,ihnp4,kpno,princeton,vax135}!astrovax!wls