Xref: utzoo comp.mail.elm:959 comp.unix.xenix:4317 Path: utzoo!utgpu!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!rutgers!cmcl2!phri!marob!daveh From: daveh@marob.MASA.COM (Dave Hammond) Newsgroups: comp.mail.elm,comp.unix.xenix Subject: Re: Elm bug Message-ID: <433@marob.MASA.COM> Date: 29 Dec 88 19:17:32 GMT References: <369@ispi.UUCP> Reply-To: daveh@marob.masa.com (Dave Hammond) Organization: ESCC New York City Lines: 46 In article <369@ispi.UUCP> jbayer@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