where does uname get version number?

Trond Endrestøl Trond.Endrestol at fagskolen.gjovik.no
Wed Apr 16 08:00:05 UTC 2014


On Wed, 16 Apr 2014 03:28-0400, John wrote:

> After a rocky upgrade from 9.1-RELEASE(-p10) to 9.2-RELEASE, all files I checked are now in 9.2-RELEASE-p3.  For example:
> 
> /usr/src/sys/conf/newvers.sh contains:
> 
> TYPE="FreeBSD"
> REVISION="9.2"
> BRANCH="RELEASE-p4"
> 
> /etc/hosts contains:
> 
> # $FreeBSD: release/9.2.0/etc/hosts 109997 2003-01-28 21:29:23Z dbaker $
> 
> and the kernel contains the new version:
>  
> # strings /boot/kernel/kernel | grep RELEASE|grep 9
> @(#)FreeBSD 9.2-RELEASE-p4 #0: Tue Apr  8 18:08:22 UTC 2014
> FreeBSD 9.2-RELEASE-p4 #0: Tue Apr  8 18:08:22 UTC 2014
> 9.2-RELEASE-p4
> 
> However, uname somehow shows the wrong version:
> 
> # uname -a
> FreeBSD localhost.localdomain 9.1-RELEASE FreeBSD 9.1-RELEASE #0 r243825: Tue Dec  4 09:23:10 UTC 2012     root at farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64
> 
> So where does uname get the version number from?  Which file(s) might not have been upgraded?  Thank you!

newvers.sh generates /usr/obj/usr/src/sys/$KERNEL/vers{ion,.c} during 
buildkernel.

Prior to running "make -D NO_CLEAN buildworld buildkernel" I always 
run "rm /usr/obj/usr/src/sys/$KERNEL/vers*" thus forcing these files 
to be regenerated with the correct information.

If you want to keep the build count stored in the 
/usr/obj/usr/src/sys/$KERNEL/version file, just run 
"rm /usr/obj/usr/src/sys/$KERNEL/vers.?".

-- 
+-------------------------------+------------------------------------+
| Vennlig hilsen,               | Best regards,                      |
| Trond Endrestøl,              | Trond Endrestøl,                   |
| IT-ansvarlig,                 | System administrator,              |
| Fagskolen Innlandet,          | Gjøvik Technical College, Norway,  |
| tlf. mob.   952 62 567,       | Cellular...: +47 952 62 567,       |
| sentralbord 61 14 54 00.      | Switchboard: +47 61 14 54 00.      |
+-------------------------------+------------------------------------+


More information about the freebsd-questions mailing list