jr@amanue.UUCP (Jim Rosenberg) (04/09/88)
I'm in the process of getting things all ship-shape on an Altos 2000. I had to put a rather disgusting hack into Elm to get it to know my site name, since uname(2) reports "" for the nodename. This is probably available by RTFMing *some*where, but does anybody know how to set the node name on an Altos 2000 so that uname(2) knows it? I've set /etc/systemid -- if I remember that file name correctly -- which keeps uucp happy enough. I wouldn't be surprised if none of the Altos utilities even *use* uname(2). This is a Xenix System V -- exactly which version I don't have in front of me, and the machine isn't up for login yet. Where does the uname(2) information reside? It doesn't seem to be in the kernel. Somone once told me he thought it was in the superblock. Is this correct? If so, can one fsdb the uname(2) nodename into place? I have patched superblocks on occasion, but I sure don't enjoy it. Any help appreciated. -- Jim Rosenberg CIS: 71515,124 decvax!idis! \ WELL: jer allegra! ---- pitt!amanue!jr BIX: jrosenberg uunet!cmcl2!cadre! /
ron@topaz.rutgers.edu (Ron Natalie) (04/10/88)
There is a struct in system V called something like utsname that has all the stuff in it that the UNAME system call returns. I suppose that they expect you to compile it into the system as they give you no other way to set it. You can fix it with adb (the format of the structures is in one of the include files you do have) but my favorite is to run EMACS on /unix to change it. Don't forget to turn on overwrite mode. You can use the search command to find the text of the string. -Ron
jack@turnkey.TCC.COM (Jack F. Vogel) (04/15/88)
In article <267@amanue.UUCP> jr@amanue.UUCP (Jim Rosenberg) writes: >I'm in the process of getting things all ship-shape on an Altos 2000. I had >to put a rather disgusting hack into Elm to get it to know my site name, since >uname(2) reports "" for the nodename. >... does anybody know how to set the node name on an Altos 2000 >so that uname(2) knows it? Although Altos's Xenix is typically NOT SysV compatable, if it conforms with SCO's release there should be a way in the link kit to enter the nodename and then relink the kernal. Check to see what you have in the /usr/sys/conf directory (if Altos even has this), there should be an executable there called configure. This program or some equivalent should let you tune the parameters of the kernal. If you do not have this you will need to use adb, check your documentation, in the 2.1.3 release there was documentation on how to enter the nodename into the kernal using adb. >Where does the uname(2) information reside? It doesn't seem to be in the >kernel. Somone once told me he thought it was in the superblock. Is this >correct? No this is not correct, the uname data resides in the kernal in a structure called utsname. Sorry I could not be more definitive on how to do this but my experience with Altos has been that more often than not they do things differently. Best advise is to check your manuals. Best of luck, -- Jack F. Vogel Turnkey Computer Consultants, Costa Mesa, CA UUCP: ...{nosc|uunet}!turnkey!jack Internet: jack@turnkey.TCC.COM
henrik@blblbl.UUCP (Larry DeLuca) (04/17/88)
In article <173@turnkey.TCC.COM>, jack@turnkey.TCC.COM (Jack F. Vogel) writes: } In article <267@amanue.UUCP> jr@amanue.UUCP (Jim Rosenberg) writes: } >I'm in the process of getting things all ship-shape on an Altos 2000. I had } >to put a rather disgusting hack into Elm to get it to know my site name, since Folks, it's really *quite* easy. Put the node name in /etc/systemid. That's all there is to it. larry...
mdc@mcp.entity.com (Marty Connor) (04/18/88)
In article <208@blblbl.UUCP>, henrik@blblbl.UUCP (Larry DeLuca) writes: > Folks, it's really *quite* easy. Put the node name in /etc/systemid. That's > all there is to it. larry... On a box running SCO Xenix 2.2.1 you should do: cd /usr/sys/conf ./configure 10 <new name> q y and reboot the system. Changing /etc/systemid will not change the name that the kernel reports via a system call. We found this out when bringing up News. It is a little strange that this requires re-linking the kernel. But, as a fellow on TV just said... 'you have my word on it.' -- ---------------- Marty Connor Director of Innovation, The Entity mdc@mcp.entity.com, ...{harvard|uunet}!mit-eddie!spt!mcp!mdc
jr@amanue.UUCP (Jim Rosenberg) (04/20/88)
In article <208@blblbl.UUCP> henrik@blblbl.UUCP (Larry DeLuca) writes: >In article <173@turnkey.TCC.COM>, jack@turnkey.TCC.COM (Jack F. Vogel) writes: >} In article <267@amanue.UUCP> jr@amanue.UUCP (Jim Rosenberg) writes: >} >I'm in the process of getting things all ship-shape on an Altos 2000. I had >} >to put a rather disgusting hack into Elm to get it to know my site name, since > > >Folks, it's really *quite* easy. Put the node name in /etc/systemid. That's >all there is to it. Uh, well, no, that's not all there is to it. Not to flame, but horsefeathers. I believe I mentioned in my original article that I *DID* set /etc/systemid, and uname(1) still reports (empty) as the nodename. At the moment our system *doesn't* have the link kit, though I will probably get it. So thanks to all who suggested adb'ing the kernel; looks like that's what I would have to do. To the person who suggested just setting /etc/systemid, try uname(1) on your machine and see what it does! -- Jim Rosenberg CIS: 71515,124 decvax!idis! \ WELL: jer allegra! ---- pitt!amanue!jr BIX: jrosenberg uunet!cmcl2!cadre! /
frankb@usource.UUCP (Frank Bicknell) (08/02/89)
I have made the aquaintance of one who uses Interactive Unix. Imagine my surprise (no, not really) when he told me that the 'sysserial' field of the utsname struct is not documented in their uname(2) system call. I checked out my own (ancient, 2.2 '286 DS) <sys/utsname.h> and found the following (some non-essential stuff is deleted): > struct utsname { > char sysname[SYS_NMLN]; > char nodename[SYS_NMLN]; > char release[SYS_NMLN]; > char version[SYS_NMLN]; > char machine[SYS_NMLN]; > char reserved[15]; > unsigned short sysorigin; /* original supplier of Xenix system */ > unsigned short sysoem; /* OEM for this system */ > long sysserial; /* serial number for this system */ > }; Ok, I'm used to that one. > struct uts3name { > char sysname[SYS_NMLN]; > char nodename[SYS_NMLN]; > char release[SYS_NMLN]; > char version[SYS_NMLN]; > unsigned short sysorigin; /* original supplier of Xenix system */ > unsigned short sysoem; /* OEM for this system */ > long sysserial; /* serial number for this system */ > }; Perhaps an older (newer?) one? > struct utsV3name { > char sysname[SYS_NMLN]; > char nodename[SYS_NMLN]; > char release[SYS_NMLN]; > char version[SYS_NMLN]; > char machine[SYS_NMLN]; > }; Uh-oh. sysserial is missing. And judging from the 'V3' stuck in the middle of the struct tag, this is for System V 3.*. It also happens to match the breakout of the structure as depicted in Interactive's documentation under uname(2). Yet when his Interactive machine runs a short program calling uname(2) compiled on my Xenix compiler, it returns 0 in the sysserial field. Now I wonder if Unix 3.2 is dropping the serialized OS. I also wonder if other Unix systems will remain serial-number-less. Does anyone out there know anything about this? -- Frank Bicknell UniSource; 1405 Main St, Ste 709; Sarasota, FL 34236 attctc!usource!frankb || frankb@usource.UUCP