Subject: Re: vmstat, iostat etc no longer work?
To: NetBSD-current Users <current-users@NetBSD.ORG>
From: Curt Sampson <cjs@portal.ca>
List: current-users
Date: 11/12/1996 10:17:47
> 	rm -f /var/run/kernel
> 	if [ -n "`sysctl kern.hostname`" ]; then
> 	    ln -s `sysctl kern.hostname` /var/run/kernel
> 	fi

Actually, that should read `sysctl kern.loadfile' instead, of course.
A few other changes:

    if sysctl kern.loadfile >/dev/null 2>&1 && [ -n "`sysctl kern.loadfile`" ];
    then
	rm -f /var/run/kernel
	ln -s `sysctl kern.hostname` /var/run/kernel
    fi

We need to modify sysctl so that it returns a proper error code if
the variable name isn't found. (Right now it returns zero, regardless
of whether or not that name is valid.) We also move the rm within
the if so that a standard install for those systems that don't
support this can set up the symlink /var/run/kernel -> /netbsd and
it will just sit there forever, giving functionality just like we
have now.

If this is something we want to go ahead with, I'll be happy to
fix sysctl and /etc/rc, and also do the kernel work for the alpha
kernel.  I might be able to do i386 and sparc, but I've not looked
at those too closely yet.

cjs

Curt Sampson    cjs@portal.ca		Info at http://www.portal.ca/
Internet Portal Services, Inc.	
Vancouver, BC   (604) 257-9400		De gustibus, aut bene aut nihil.