From owner-freebsd-current@FreeBSD.ORG Fri Aug 25 19:00:36 2006 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 94C9116A511 for ; Fri, 25 Aug 2006 19:00:36 +0000 (UTC) (envelope-from prvs=julian=38535a252@elischer.org) Received: from a50.ironport.com (a50.ironport.com [63.251.108.112]) by mx1.FreeBSD.org (Postfix) with ESMTP id A1DE543D8D for ; Fri, 25 Aug 2006 18:59:47 +0000 (GMT) (envelope-from prvs=julian=38535a252@elischer.org) Received: from unknown (HELO [192.168.2.6]) ([10.251.60.50]) by a50.ironport.com with ESMTP; 25 Aug 2006 11:59:46 -0700 Message-ID: <44EF48A2.3020600@elischer.org> Date: Fri, 25 Aug 2006 11:59:46 -0700 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.13) Gecko/20060414 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "Yuan, Jue" References: <200608252000.07240.yuanjue02@gmail.com> <44EF13CA.2070003@delphij.net> <200608252320.50363.yuanjue02@gmail.com> In-Reply-To: <200608252320.50363.yuanjue02@gmail.com> Content-Type: text/plain; charset=x-gbk; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-current@freebsd.org, LI Xin Subject: Re: How to change kernel version? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Aug 2006 19:00:36 -0000 Yuan, Jue wrote: >On Friday 25 August 2006 23:14, LI Xin wrote: > > >>Yuan, Jue wrote: >> >> >>>Hi all. >>> >>>Could I change the kernel version tag manually? say, I have a kernel >>>which is 7.0-CUREENT, but for some reasons I wanna it be something like >>>6.1-RELEASE, while the kernel itself does't change from 7.0-CURRENT to >>>6.1-RELEASE. All I want is the change of tag. For example, if this works, >>>then when I type "uname -a" in console, I would get "6.1-RELEASE ..." >>>instead of "7.0-CURRENT ...". >>> >>>I guess some config files in src/sys/ could take care of this. But I >>>cannot find it out. Anybody knows how to get this job done? >>> >>>Any ideas are really appreciated. :-) >>> >>>BTW: I am not in this list. So if you reply, please CC a copy to me. >>>Thanks. >>> >>> >>Changing the represented release name is not a generally wise idea. You >>may also want to modify sys/sys/param.h, consult the FreeBSD Porters' >>Handbook for more details. >> >>If you just want to cheat uname(1) and/or sysctl(8), perhaps renaming >>them to _uname and _sysctl and use some sort of _uname $@ | sed -e >>s/`_uname -r`/6.1-RELEASE/g trick will do. This also applies to the >>rc.d motd script, which uses uname(1) to determine the current FreeBSD >>version. This trick is less intrusive, but have no effect if your >>application read the version themselves, e.g. the build process of >>python, etc. >> >> >> >Thanks for this enlightment. Very helpful :-) > > ENVIRONMENT 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.