Callan UUCP system names on System-V, utsname.

Robert L. Fair cim2 at pyuxv.UUCP
Sat Sep 7 01:12:14 AEST 1985


>From: gww at aphasia.UUCP (George Williams)
>    We have here a callan box (modified by someone else if that matters) running
>system 5 unix (no source of course, we have 4.2bsd source on a vax if that can
>be modified).  The box is of the opinion that its uuname is `clm' we would like
>to convince it otherwise; there does not seem to be a hostname command, or any
>equivalent.  One system V that we have has a magic little file that lives in
>/usr/lib/uucp that contains this name, does callan?
>
>    It seems to me that I read somewhere that the host name was compiled into
>the kernel under sysV, that seems dumb, and unbelievable (we don't have source).

Yes indeedy, the host name is compiled into the kernel. The good news is
that you don't always need a source licence to change it, just 
the ability to re-link the kernel, which most binary vendors
provide.

System-V has a kernel structure called 'utsname' which contains lots of
useful information about your particular bit of metal: 

	struct utsname utsname = {
		SYS,
		NODE,
		REL,
		VER,
		MACH,
	};

where the things in CAPS are put in a #define  by the makefile
when linking the kernel - Don't edit the source file itself ! 
UUCP reads the NODE to get the local system name.

If you want to print out the contents of 'utsname', use the 'sar'
command - The first line of the output should contain all the
entries from 'utsname' (also see 'uname(2)')

Note that some versions of UUCP also have an external Node name 
(see the UUCP documentation for your machine).  Its my sad experience that 
if the two don't agree poor UUCP can get very confused !!

Setting NODE is machine dependent, most good vendors allow you
to relink the kernel to tweak all the good things in '/etc/master',
add new device drivers etc. The libaries & makefile will
probably lie in a directory like '/kernel' or '/sys'
(unlike a source machine, when the directory is typically /usr/src/uts/)
'utsname' normally resides in '..../cf/name.c', which is one of the 
2 or 3 source files often distributed on binary systems.
The traditional way to re-link the kernel is something like:

	cd /kernel
	make unix VER=proto REL=5.2  SYS=mine NODE=wibble ...
	                                      ===========

which produces a new kernel in some standard place - typically
called 'unixproto' 

Sorry I can't be more specific, but I'm not a callan guru...
Anyone out there who is ????

Rob. Fair
Bell Communications Research
Piscataway.
{bambi | gamma}!pyuxv!cim2

To boldy step on toads where no toads have been stepped on before.



More information about the Comp.unix.wizards mailing list