From owner-freebsd-current@FreeBSD.ORG Fri Aug 25 15:14:37 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 9991516A4DD for ; Fri, 25 Aug 2006 15:14:37 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from tarsier.geekcn.org (tarsier.geekcn.org [210.51.165.229]) by mx1.FreeBSD.org (Postfix) with ESMTP id 81AA243D55 for ; Fri, 25 Aug 2006 15:14:29 +0000 (GMT) (envelope-from delphij@delphij.net) Received: from localhost (tarsier.geekcn.org [210.51.165.229]) by tarsier.geekcn.org (Postfix) with ESMTP id 9BD7FEB0EC1; Fri, 25 Aug 2006 23:14:26 +0800 (CST) X-Virus-Scanned: amavisd-new at geekcn.org Received: from tarsier.geekcn.org ([210.51.165.229]) by localhost (mail.geekcn.org [210.51.165.229]) (amavisd-new, port 10024) with ESMTP id fCQY8yP8TeUo; Fri, 25 Aug 2006 23:14:25 +0800 (CST) Received: from [192.168.1.32] (unknown [221.222.204.70]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tarsier.geekcn.org (Postfix) with ESMTP id 12170EB0909; Fri, 25 Aug 2006 23:14:24 +0800 (CST) DomainKey-Signature: a=rsa-sha1; s=default; d=delphij.net; c=nofws; q=dns; h=message-id:date:from:organization:user-agent:mime-version:to:cc: subject:references:in-reply-to:x-enigmail-version:content-type; b=edkzM4d5dlek/Rz02SW2h2JgOKfR2RMAjLnVAhBVQGjAV1wC7rQO5bKDIF6MIQeId J6Sq9yZuJIv9+3OiosHmg== Message-ID: <44EF13CA.2070003@delphij.net> Date: Fri, 25 Aug 2006 23:14:18 +0800 From: LI Xin Organization: The FreeBSD Project User-Agent: Thunderbird 1.5.0.5 (Macintosh/20060719) MIME-Version: 1.0 To: "Yuan, Jue" References: <200608252000.07240.yuanjue02@gmail.com> In-Reply-To: <200608252000.07240.yuanjue02@gmail.com> X-Enigmail-Version: 0.94.1.0 Content-Type: multipart/signed; micalg=pgp-ripemd160; protocol="application/pgp-signature"; boundary="------------enig5EDA70A59F901C56798E3931" 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:14:37 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig5EDA70A59F901C56798E3931 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Yuan, Jue wrote: > Hi all. >=20 > Could I change the kernel version tag manually? say, I have a kernel wh= ich is=20 > 7.0-CUREENT, but for some reasons I wanna it be something like 6.1-RELE= ASE,=20 > while the kernel itself does't change from 7.0-CURRENT to 6.1-RELEASE. = All I=20 > want is the change of tag. For example, if this works, then when I=20 > type "uname -a" in console, I would get "6.1-RELEASE ..." instead=20 > of "7.0-CURRENT ...". >=20 > I guess some config files in src/sys/ could take care of this. But I ca= nnot=20 > find it out. Anybody knows how to get this job done? >=20 > Any ideas are really appreciated. :-) >=20 > BTW: I am not in this list. So if you reply, please CC a copy to me. Th= anks. 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. Cheers, --=20 Xin LI http://www.delphij.net/ FreeBSD - The Power to Serve! --------------enig5EDA70A59F901C56798E3931 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFE7xPKOfuToMruuMARAzNfAJ9latjmFkDaK8u28GCV/88m1+etPwCeOitk 2Le59Evlpxwx1Au639aLNJA= =ciO7 -----END PGP SIGNATURE----- --------------enig5EDA70A59F901C56798E3931--