Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ipconfig waitall > /dev/null 2>&1



On Friday, March 29, 2002, at 02:55 PM, "Peter \"Pierro' W Brewer" <email@hidden> wrote:

This comes after ipconfig waitall... making me wonder...

##
# See if the network is up now
##
CheckForNetwork

# Set HOSTNAME if needed
if [ "${HOSTNAME:=-AUTOMATIC-}" = "-AUTOMATIC-" ]; then
HOSTNAME=$(ipconfig getoption "" host_name)
if [ $? -eq 0 ]; then
hostname "${HOSTNAME}"
fi
fi

I suspect that ipconfig would have to get host_name from netinfo.

The ipconfig getoption "" host_name command fetches the host name provided by a DHCP server if that's how you got your IP address. If you didn't get your address via DHCP or a host name wasn't provided by the server then these lines are an effective NOOP. NetInfo is not in the picture at this time.

Its seems clear that netstat -r relies on lookupd...

If you omit the "-n" option then the netstat command ends up making a bunch of calls to getnetbyaddr() to find a meaningful name for each network. Try using "netstat -rn" if you want to skip these calls.

- Allan
_______________________________________________
darwinos-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwinos-users
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: ipconfig waitall > /dev/null 2>&1 (From: "Peter \"Pierro' W Brewer" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.