Date: Wed, 16 Apr 2014 09:59:50 +0200 (CEST) From: =?ISO-8859-1?Q?Trond_Endrest=F8l?= <Trond.Endrestol@fagskolen.gjovik.no> To: John <aqqa11@earthlink.net> Cc: freebsd-questions@freebsd.org Subject: Re: where does uname get version number? Message-ID: <alpine.BSF.2.00.1404160953310.9102@mail.fig.ol.no> In-Reply-To: <6908156.1397633293718.JavaMail.root@elwamui-hybrid.atl.sa.earthlink.net> References: <6908156.1397633293718.JavaMail.root@elwamui-hybrid.atl.sa.earthlink.net>
next in thread | previous in thread | raw e-mail | index | archive | help
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. | +-------------------------------+------------------------------------+ From owner-freebsd-questions@FreeBSD.ORG Wed Apr 16 08:03:58 2014 Return-Path: <owner-freebsd-questions@FreeBSD.ORG> Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3472F1EA for <freebsd-questions@freebsd.org>; Wed, 16 Apr 2014 08:03:58 +0000 (UTC) Received: from nm32.bullet.mail.ir2.yahoo.com (nm32.bullet.mail.ir2.yahoo.com [212.82.96.57]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 83B321B76 for <freebsd-questions@freebsd.org>; Wed, 16 Apr 2014 08:03:57 +0000 (UTC) Received: from [212.82.98.60] by nm32.bullet.mail.ir2.yahoo.com with NNFMP; 16 Apr 2014 08:01:48 -0000 Received: from [46.228.39.97] by tm13.bullet.mail.ir2.yahoo.com with NNFMP; 16 Apr 2014 08:01:48 -0000 Received: from [127.0.0.1] by smtp134.mail.ir2.yahoo.com with NNFMP; 16 Apr 2014 08:01:48 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.es; s=s1024; t=1397635308; bh=1skwsfw9DfWyF496K8hAUs0bAFy9d1KBpmLKu/hQL6I=; h=X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:X-Rocket-Received:Date:From:To:Cc:Subject:Message-Id:In-Reply-To:References:X-Mailer:Disposition-Notification-To:Mime-Version:Content-Type:Content-Transfer-Encoding; b=Y8q042TWCJHoyksd4PsNjAMjXMpmNpOxhBbosyujSGtqNL0Ia5HIYmIy6GkPpvo4cfuCPF9sQIQGvK5he/kRhXFHCXGg+h7K23gfBC85GbBHfIV1F1n9bL8iH7jQfBoXo/hxTvq7uh9UZFA2G1/gkPyI4SgdqJlPEWpFmFbp+YU= X-Yahoo-Newman-Id: 632951.2510.bm@smtp134.mail.ir2.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: hYS3sekVM1nvqlRzHJHQ8Ja5THARoANHkTQOMeDEVt2A_Rg iPdQPXaL8VKVGPwmmepsD56UaDPmRNvticYe73OZqdsqXtxCgUtxAlATk2rr RA_2OBdCNVEgI_KA6fCSiWs.xXsGvu2LP_lH.0QaFGm7eyFYm2cxQzGHDG9v GRr.kSA69QVISClYjO4H_AVbCx6OHiVLqx06v8PvmlUPmNip8781gc8fSQrV 6iwcLvUigw8ihfhd_puAsDLBYHz2sAKOlHgH9YLxMcrsjMl9_YwLB2kv3SzK 5GjMQ3J79edWzRcqpXOgJ0PLryoQuwTD40ICpnhrhOGCsC9Rp4pu8I90Pa67 SRSWnv6qpnDol1CRUzBrQGjYnycsFc7W4kXps0fxbpwA7nqfnkKjz.gourYH fSwEbIk4i8qyK.6NjpNgylVUkfmI2PM1vGiMUbXBuVcrgru8nI7Kf5U46sql 4fWs9NEaldnae07iRmLItx1fUYEGud.rhYrK9xLAKm4_MBuHrlym13EHj02I NH.7.brG.8uyV13E1_JVxiwAiwy.mSPvuwHKI1Zood0e3gNpyFxd6R6h9zHL EOfP2mJh9TlwBT5ilDEHblvfE1OzBJ58m3ZvmzMrC5R7Ss1QxEYwuS8VkkKv PdEYtKTOvVPrQdaO_79hr5SIF X-Yahoo-SMTP: mX392iiswBAeJNdO_s.EW62LZDJR X-Rocket-Received: from camibar.emorras.eu (emorrasg@85.219.45.142 with plain [98.138.105.21]) by smtp134.mail.ir2.yahoo.com with SMTP; 16 Apr 2014 08:01:48 +0000 UTC Date: Wed, 16 Apr 2014 10:04:31 +0200 From: Eduardo Morras <emorrasg@yahoo.es> To: freebsd-questions@freebsd.org Subject: Re: where does uname get version number? Message-Id: <20140416100431.cf6851f30f3af6c6ebdcaef7@yahoo.es> In-Reply-To: <6908156.1397633293718.JavaMail.root@elwamui-hybrid.atl.sa.earthlink.net> References: <6908156.1397633293718.JavaMail.root@elwamui-hybrid.atl.sa.earthlink.net> X-Mailer: Sylpheed 3.3.1 (GTK+ 2.24.22; amd64-portbld-freebsd9.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: John <aqqa11@earthlink.net> X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: User questions <freebsd-questions.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/options/freebsd-questions>, <mailto:freebsd-questions-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-questions/> List-Post: <mailto:freebsd-questions@freebsd.org> List-Help: <mailto:freebsd-questions-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-questions>, <mailto:freebsd-questions-request@freebsd.org?subject=subscribe> X-List-Received-Date: Wed, 16 Apr 2014 08:03:58 -0000 On Wed, 16 Apr 2014 03:28:13 -0400 (GMT-04:00) John <aqqa11@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: > > 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! 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@yahoo.es>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.00.1404160953310.9102>