Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/5/84; site luke.UUCP Path: utzoo!watmath!clyde!bonnie!akgua!whuxlm!whuxl!houxm!ihnp4!qantel!hplabs!oliveb!bene!luke!itkin From: itkin@luke.UUCP (Steven List) Newsgroups: net.unix Subject: Re: How do I set the nodename field in USG 3.0 Unix uname? Message-ID: <304@luke.UUCP> Date: Sat, 3-Aug-85 16:37:58 EDT Article-I.D.: luke.304 Posted: Sat Aug 3 16:37:58 1985 Date-Received: Mon, 5-Aug-85 07:35:51 EDT References: <821@ncoast.UUCP> Reply-To: itkin@luke.UUCP (Steven List) Organization: Benetics Corp, Mt.View, CA Lines: 34 Summary: In article <821@ncoast.UUCP> bsa@ncoast.UUCP (Brandon Allbery) writes: >My question is, should I patch uname.c to compile in the fake uname(), or >else how do I go about informing the kernel of our node name? I'm not sure about your system. Plexus provides a program called `dconfig(8)' that updates the information in block zero on the disk. Block zero is read by the kernel during boot to determine such things as logical disk configuration, swap space, and node name. I'm pretty sure that it's Plexus specific. That block is described on this system in /usr/include/sys/disk.h. Maybe there's something similar on your system. A method I use when I need to change the system node name dynamically (the other only works across a boot) is a little program called `setnode'. Yes, in all modesty, I wrote it myself. It looks for a structure called utsname in the kernel memory, one element of which is the node name (also included are the other three parts of what shows up in the `uname -a' call). Since the uname(1) call is standard UN*X, this is also probably common. Anyway, the program finds the structure with an nlist(2) call and then updates and rewrites it. This does not permanently change the node name, just in memory. To make it (relatively) permanent, setnode could be run from /etc/rc. If there is any interest in my program, I'll post it to mod.sources. I haven't thus far since I haven't felt that there would be widespread need for it. Let me know by mail if there's interest. -- *** * Steven List @ Benetics Corporation, Mt. View, CA * Just part of the stock at "Uncle Bene's Farm" * {cdp,greipa,idi,oliveb,sun,tolerant}!bene!luke!itkin ***