Elm bug
Dave Hammond
daveh at marob.MASA.COM
Fri Dec 30 05:17:32 AEST 1988
In article <369 at ispi.UUCP> jbayer at ispi.UUCP (Jonathan Bayer) writes:
>It seems that elm REQUIRES that the system node name be available
>via uname(). Since my system name is "ispi", and there is a bug :-( in
>the SCO configure utility which requires that the node name be either 0
>characters long or >4 characters long, I have not compiled a node name
>into the system.
Thanks for confirming why Configure fails when I try to install "cmx1"
as a client machine's node name!
>It might be a good idea to add an optional define in one of the header
>files (sysdefs.h is a good one) which would override any name obtained
>from either uname or gethostname. This would be good for those people
>who for whatever reason can not set the node name in the kernel.
Toward that end, I applied the following change to gethostname() in
opt_utils.c (sorry, its not a diff 'cos I'm not running the most current
version of Elm):
/* old version simply read:
hostname[size - 1] = '\0';
*/
/* replace with: */
if (*name.nodename)
hostname[size - 1] = '\0';
else {
FILE *fp = fopen("/etc/systemid", "r");
if (fp != (FILE *)0) {
if (fgets(hostname, size-1, fp))
hostname[ strlen(hostname)-1 ] = '\0';
(void) fclose(fp);
}
}
This change grabs the contents of /etc/systemid if uname() returns an
empty string.
Hope this helps.
--
Dave Hammond
...!uunet!masa.com!{marob,dsix2}!daveh
More information about the Comp.unix.xenix
mailing list