[10304] in Athena Bugs
/etc/athena/netconfig
daemon@ATHENA.MIT.EDU (Ghost)
Mon Feb 22 11:49:25 1993
To: bugs@Athena.MIT.EDU
Date: Mon, 22 Feb 93 11:49:17 EST
From: Ghost <timo@Athena.MIT.EDU>
System name: tailgunner
Type and version: KN01 7.4H
Display type: PMAX-MFB
Verstion: decmips 7.4H
What were you trying to do?
Print out useful info from the netconfig command.
What's wrong:
Well, the netconfig problem should be fixed. Namely, the
following lines:
>> if (debug) {
>> #ifdef sun
>> in.s_addr = nip->ni_recommend;
>> printf("\tAddress %s\n", inet_ntoa(in));
>> in.s_addr = nip->ni_netmask;
>> printf("\tMask %s\n", inet_ntoa(in));
>> in.s_addr = nip->ni_broadcast;
>> printf("\tBroadcast %s\n", inet_ntoa(in));
>> in.s_addr = nip->ni_gateway;
>> printf("\tGateway %s\n", inet_ntoa(in));
>> #else
>> printf("Chose parameters:\n");
>> printf("\tAddress %s\n", inet_ntoa(nip->ni_recommend));
>> printf("\tMask %s\n", inet_ntoa(nip->ni_netmask));
>> printf("\tBroadcast %s\n", inet_ntoa(nip->ni_broadcast));
>> printf("\tGateway %s\n", inet_ntoa(nip->ni_gateway));
>> #endif
Each of the above "printf" commands should be changed to "fprintf" so
that the output goes to stderr. The reason for this is the use of the
netconfig command in the /etc/rc.net file:
/etc/athena/netconfig -h -l $INTERFACE > /etc/hosts.tmp 2>/dev/console
If I want to print out the debugging info (assuming it is a private
workstation), then I cannot set the debug level to 1. If I do, the
output will go into the "hosts.tmp" file. The "hosts.tmp" file is then
"mv"ed to the /etc/hosts file, which would cause problems if there were
debug info in it.
What should have happened:
See above...
Please describe any relevant documentation references:
/source/athena/athena.etc/netconfig.c
/etc/rc.net
.........................................................................
. happy daze . .
. -tim O . The sum of the intelligence on .
. <timo@mit.edu> . the planet is a constant. .
. Tim O'Malley . The population is increasing. .
. I/S CSS Consultant . .
.........................................................................