From owner-freebsd-current@FreeBSD.ORG Fri Aug 25 15:18:31 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 EA00316A4DE for ; Fri, 25 Aug 2006 15:18:31 +0000 (UTC) (envelope-from yuanjue02@gmail.com) Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.180]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2D49743D5C for ; Fri, 25 Aug 2006 15:18:31 +0000 (GMT) (envelope-from yuanjue02@gmail.com) Received: by py-out-1112.google.com with SMTP id o67so1155853pye for ; Fri, 25 Aug 2006 08:18:30 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:from:organization:to:subject:date:user-agent:cc:references:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:message-id; b=l3qR9vgemUy4nrjevRoGSXVf+8DSRmUFG6UwKcoNqynAeaSwR6+39Giz76+mRl34j900Hwv887AZOwMnT+i2OaPdUV9cVUc0bdsuVODspFHQp8EgEWd8e2UynyW22vdwpGNM0gsULYIaluZzGpVQp1w9dDWHJlenEfuc0ckUS7I= Received: by 10.35.93.15 with SMTP id v15mr5255816pyl; Fri, 25 Aug 2006 08:18:29 -0700 (PDT) Received: from ?222.48.99.94? ( [124.172.191.97]) by mx.gmail.com with ESMTP id w25sm2980120pyw.2006.08.25.08.18.27; Fri, 25 Aug 2006 08:18:28 -0700 (PDT) From: "Yuan, Jue" Organization: Institute of Computing Technology, CAS, China To: LI Xin Date: Fri, 25 Aug 2006 23:20:50 +0800 User-Agent: KMail/1.9.3 References: <200608252000.07240.yuanjue02@gmail.com> <44EF13CA.2070003@delphij.net> In-Reply-To: <44EF13CA.2070003@delphij.net> MIME-Version: 1.0 Content-Type: text/plain; charset="gbk" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200608252320.50363.yuanjue02@gmail.com> X-Mailman-Approved-At: Fri, 25 Aug 2006 16:31:11 +0000 Cc: freebsd-current@freebsd.org 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 15:18:32 -0000 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 :-) -- Best Regards Yuan, Jue @ http://www.yuanjue.net