where does uname get version number?
emorrasg at yahoo.es
Wed Apr 16 08:03:58 UTC 2014
On Wed, 16 Apr 2014 03:28:13 -0400 (GMT-04:00)
John <aqqa11 at earthlink.net> 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:
> /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
> 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!
There was a thread about it last october. I c&p part of my answer here:
>From uname and uname(3) man pages,
"An environment variable composed of the string UNAME_ followed by any
flag to the uname utility (except for -a) will allow the corresponding
data to be set to the contents of the environment variable."
The -a flag behave as though the options -m, -n, -r, -s, and -v were specified. Freebsd-update can modify /root/.profile or better, /etc/profile, adding those environment variables with correct and update values.
Eduardo Morras <emorrasg at yahoo.es>
More information about the freebsd-questions