Subject: Re: shell scripts in an emulation environment
To: None <tv@NetBSD.ORG>
From: Gordon W. Ross <email@example.com>
Date: 01/29/1998 17:44:43
> Date: Thu, 29 Jan 1998 16:46:39 -0500 (EST)
> From: Todd Vierling <tv@NetBSD.ORG>
IS> you mean, sysctl hw.cpumodel (which doesn't exist yet)?
> No, I meant *hostid*. (Perhaps I was wrong in thinking that SunOS/sun3 had
> hostid's.) On SPARC SunOS/Solaris, and on Solaris x86, there is a `hostid'
> used to `uniquely' identify your computer, used in licensing software--which
> is a pain in the butt if you license software and then upgrade your box.
This is the "hostid" on NetBSD:
venus# sysctl kern.hostid
kern.hostid = 318774118
Or, in SunOS-compatible form:
set id = `sysctl kern.hostid`
printf "%X\n" "$id"