4.1 and netmask problem/solution

Milo S. Medin medin at cincsac.arc.nasa.gov
Sat Dec 8 11:52:00 AEST 1990


The problem is that in SunOS 4.1, they do some cute shell programming to
pull out the IP address out of the hostname.xx0 file.  This is great,
because this way the rc.* files can be the same on all the clients, and
only the stuff in /etc needs to be different.  The problem is that define
the IFS to "." in this little loop, and this causes the .'s in the IP
netmask or broadcast settings to be turned into spaces!  Just do a sh -v
-x /etc/rc.local and see what the shell actually thinks it's chewing on,
and it's pretty clear what the problem is.  The fix is to specify the
netmask and broadcast address in hex, which has no .'s in it, and this
will get left alone by the shell processing and work.  It took a while for
us to figure this out, though SUN software support should have known.

This is actually very useful, as now configuring new clients is very easy,
and we can rdist updates of system configuration files around without have
to resort to ugliness in dealing with the individual workstation
configuration details.  Kudo's to Sun for this!  It's a great idea.  Now
all they need to do is make sure the Sunlink products don't mess with the
rc files either!

						Thanks,
						    Milo



More information about the Comp.sys.sun mailing list