netnews@wnuxb.UUCP (Heiby) (06/27/85)
Unix Technical Digest Thu, 27 Jun 85 Volume 2 : Issue 13 Today's Topics: 'tablet' line discipline in 4.2 BSD /etc/passwd protocols ARPA time in SYS III? Callan (v7) losing blocks upon power-up chroot(2) Emulex CS32 multiplexer problems requests to mod.unix ---------------------------------------------------------------------- Date: Tue, 25 Jun 85 09:41:11 MDT From: utah-cs!utah-gr!thomas@utah-gr.UTAH-CS (Spencer W. Thomas) Subject: 'tablet' line discipline in 4.2 BSD The 4.2 "tablet" discipline supports a couple of tablet types -- yours might be one of them. Basically, all you need to do is get your tablet running, then select the appropriate line discipline. When you read, you get a struct struct tbpos { int xpos; int ypos; short status; short scount; } back. If there isn't support for your tablet type, you need to do a little more work, but reading the code and modifying one of the supplied types isn't too hard. I did it for a bitpad a couple of years ago. -- =Spencer ({ihnp4,decvax}!utah-cs!thomas, thomas@utah-cs.ARPA) ------------------------------ Date: Mon, 24 Jun 85 14:47:25 cst From: ihnp4!sask!zaphod!bobd (Bob Dalgleish) Subject: /etc/passwd protocols On Ultrix, (close enough to 4.2BSD for the moment), there are suite of programs and protocols for manipulating the password file. These include 'vipw', 'chfn', 'chsh', etc. We wish to provide our own chfn and finger programs (less than .01% of the 4.2 community actually works in either Evans or Cory halls), but updating the password file is still unclear to me. The following is the procedure that we might follow: Get READ-ONLY permission on /etc/passwd (using flock(2)). Copy /etc/passwd into /etc/ptmp (put EXCLUSIVE-WRITE permission on /etc/ptmp). Modify /etc/ptmp to our hearts content. Change the READ-ONLY permission on /etc/passwd to EXCLUSIVE-WRITE. Copy /etc/ptmp back to /etc/passwd. Release the lock on /etc/passwd, and delete /etc/ptmp. This is obviously a correct and sufficient procedure, if 1) All of the other programs follow the same sequence. Do they? 2) It prevents all simultaneous updates to /etc/passwd but can cause an unreasonable(?) amount of lockout while vipw is running. 3) It can obviously be circumvented by any program that does not use the advisory locking mechanism. Is there a more efficient way to do the lockout at the cost of simultaneity? Suggestions will be greatly appreciated. ------------------------------ Date: Mon, 24 Jun 85 17:17:54 est From: seismo!hadron!jsdy (Joseph S. D. Yao) Subject: ARPA time in SYS III? Two suggestions. (1) use localtime() [see ctime(3)] to get the local time; extern long int timezone will contain the (numeric) time zone; and you can format it with printf to your heart's content. Or you can do a system("date +FORMAT"); where FORMAT is arpa format. Or have I missed your r e a l question? Joe Yao hadron!jsdy@seismo.{ARPA,UUCP} ------------------------------ Date: 25-Jun-1985 18:03-EDT (Tuesday) From: masscomp!dobbs!leiby Subject: Callan (v7) losing blocks upon power-up Dieter Muller (djm@nmtvax.UUCP) writes: > After a power-up, I have it perform a file system check. It > consistently comes up with about 25-30 blocks misplaced. > (I power-off right after de-buffering everything with 'sync'). Read the man page for the /etc/reboot command, I'm pretty sure v7 has it. :-) Most computing systems provide a privileged command of some sort to take the system down cleanly. Just syncing the disks is not enuf. -- Rt. Rev. Mike Leibensperger, Archbishop of Chelmsford Church of St. Clint the Righteous ("Feel lucky, Pink Boy?") Masscomp; 1 Technology Park; Westford, MA 01886 {decvax,harpo,tektronix}!masscomp!leiby ------------------------------ Date: Tue, 25 Jun 85 09:41:11 MDT From: utah-cs!utah-gr!thomas@utah-gr.UTAH-CS (Spencer W. Thomas) Subject: chroot(2) >main(argc,argv,envp) >char **argv, **envp; >int argc; >{ > if (chroot("/ultrix") != 0) { > perror("newroot"); > exit(1); > } > execve("/bin/csh", argv, envp); If you don't have /ultrix/bin/csh, then the exec will fail because it won't be able to find the csh. You need to make a copy of most of the "system" files on your new root (including /etc/passwd, if you want to use ~). > printf("exec failed. "); > perror("newroot"); >} > -- =Spencer ({ihnp4,decvax}!utah-cs!thomas, thomas@utah-cs.ARPA) ------------------------------ Date: Tue, 25 Jun 85 11:20:32 EST From: seismo!munnari!basser.oz!john Subject: Emulex CS32 multiplexer problems We have recently purchased one of these. We are driving it with a VMZ driver which we wrote ourseleves (and has been working fine on VMZs for a long time). A careful perusal of the manual doesn't reveal any significant differences from a VMZ, yet, with the thing driving one 9600 baud terminal and the 780 in single-user mode, it outputs characters in bursts. The bursts are maybe 40 or so characters long, with pauses of about three or four seconds in between. Needless to say, this makes it useless. If we can't make it work better than that we'll have to send it back. Any assistance would be appreciated (indeed, I'd be glad just to hear from someone who has one of the things working... I've begun to wonder if they are ALL like that!). Also, I seem to recall someone mentioning on net.unix-wizards sometime last year that they had had dealings with Emulex Customer Service via USENET, and found them helpful: I'd love their address. Thanks in advance, and I'll be glad to summarize replies. John Mackin, Basser Department of Computer Science, University of Sydney, Sydney, Australia ------------------------------ Date: Mon, 24 Jun 85 14:22:34 edt From: packard!harvard!cybvax0!fbp (Rick Peralta) Subject: requests to mod.unix I always have a lot of questions and would like to submit a few to you. 1) Where are there "GOOD" sources for internall system descriptions. I have Kernagan & Ritchie, Kernagan & Pike as well as some other UNIX texts. Associated with that What schools are worth looking in to for "advanced" UNIX hacking? Is there a list somewhere of all of the schools that have source (should I see net.college) ? [Ed note: Without a source license, good internals info cannot legally be acquired. With a source license, one good source is AT&T courses. I took the Internals course from AT&T and found it to be quite good. There are other good courses, as well. RWH.] 2) When compiling a kernel (my pc runs Xenix and at work 4.2 and ultrix) what do the config variables mean ? buffers disk blocks kept (cached) in memory ? inodes inodes kept in memory ? files # open files ? clists ??? locks # system semaphoers There are some more I think, but can't remember. 3) Is it more efficient to use multiple devices ? ie: one large disk or a few smaller ones. Theoretically it shouldn't make a differance. However if the device is very large, it should get fragmented more severely and data would be spread all over the media (lost of seek time). Also the trip from swap to the end of the data segment can get expensive when running a disk intensive task (like compiling). Rick ...!cybvax0!fbp "A likely story. I don't believe a word of it." ------------------------------ End of Unix Technical Digest ****************************** -- Ronald W. Heiby / netnews@wnuxb.UUCP | unix-request@cbosgd.UUCP AT&T Information Systems, Inc., Lisle, IL (CU-D21)