Subject: checking
To: None <tech-net@netbsd.org>
From: None <itojun@iijlab.net>
List: tech-net
Date: 12/20/1999 20:46:31
	maybe tech-userlevel...

	Due to my IPv6 changes, /etc/netstart requires /usr to be mounted.
	This is because I used sysctl to check for IPv6 support.  I would
	like to avoid this and make mount of /usr to be optional as before.
	What is the best way to check for kernel's capability of doing IPv6
	(or random other protocol families, like appletalk)?

	I can think of several candidates:
	- use /sbin/ifconfig and some other tools.  I may need grep, head, tail
	  and some other things but they are in /usr.
	- add a tool that does
		if (socket(AF_INET6, SOCK_RAW, 0) < 0)
			exit(1);
		else
			exit(0);
	  into /sbin.
	- assume that everybody has "options INET6" turned on.
	but does not seem to be the best route.  If you have a good way to
	do this, please let me know.

itojun