From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1S4Bmh-00039O-La for mharc-grub-devel@gnu.org; Sun, 04 Mar 2012 08:47:35 -0500 Received: from eggs.gnu.org ([208.118.235.92]:60633) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S4Bme-000392-OJ for grub-devel@gnu.org; Sun, 04 Mar 2012 08:47:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S4Bmd-0002Bd-0h for grub-devel@gnu.org; Sun, 04 Mar 2012 08:47:32 -0500 Received: from wp191.webpack.hosteurope.de ([80.237.132.198]:39997) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S4Bmc-0002BW-Or for grub-devel@gnu.org; Sun, 04 Mar 2012 08:47:30 -0500 Received: from p54ba7451.dip.t-dialin.net ([84.186.116.81] helo=neptun.omega.ssw.de); authenticated by wp191.webpack.hosteurope.de running ExIM with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) id 1S4Bma-0003Wx-My; Sun, 04 Mar 2012 14:47:28 +0100 Received: from localhost (localhost [127.0.0.1]) by neptun.omega.ssw.de (Postfix) with ESMTP id E9E4DE180A8; Sun, 4 Mar 2012 14:47:27 +0100 (CET) X-Virus-Scanned: amavisd-new at omega.ssw.de Received: from neptun.omega.ssw.de ([127.0.0.1]) by localhost (neptun.omega.ssw.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Al4qFCP8v-L9; Sun, 4 Mar 2012 14:47:17 +0100 (CET) Received: from [192.168.2.43] (p640.fritz.box [192.168.2.43]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by neptun.omega.ssw.de (Postfix) with ESMTP id 0915FE180A7; Sun, 4 Mar 2012 14:47:17 +0100 (CET) Message-ID: <4F537261.3070402@anvo-it.de> Date: Sun, 04 Mar 2012 14:47:13 +0100 From: Andreas Vogel User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 MIME-Version: 1.0 To: =?UTF-8?B?VmxhZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28=?= Subject: Re: [PATCH] Making exported variables really global References: <4F536941.8070805@anvo-it.de> <4F536B8A.6060501@gmail.com> In-Reply-To: <4F536B8A.6060501@gmail.com> X-Enigmail-Version: 1.3.5 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-bounce-key: webpack.hosteurope.de; andreas.vogel@anvo-it.de; 1330868850; bc54596a; X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.237.132.198 Cc: The development of GNU GRUB X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2012 13:47:34 -0000 Am 04.03.2012 14:18, schrieb Vladimir '=CF=86-coder/phcoder' Serbinenko: > On 04.03.2012 14:08, Andreas Vogel wrote: >> Hi all, >> >> This tiny patch makes exported variables really global. Right now >> exported variables are set in the context of a submenu when running it= =2E >> But any changes to those vars are lost when leaving the submenu. This >> patch sets and exports all vars in the calling context for the submenu= >> which are exported in the context of the submenu. > We follow the bash behaviour. And the bash behaviour is exactly what > GRUB does: > phcoder@debian.x201.phnet:14:15:11:~/grub2/bzr/mainline$ bash > phcoder@debian.x201.phnet:14:15:15:~/grub2/bzr/mainline$ export XYZ=3Dx= > phcoder@debian.x201.phnet:14:15:19:~/grub2/bzr/mainline$ exit > phcoder@debian.x201.phnet:14:15:20:~/grub2/bzr/mainline$ echo $XYZ > > phcoder@debian.x201.phnet:14:15:24:~/grub2/bzr/mainline$ > I understand your point, but IMHO we do need to be able to set global vars in submenus, that's my patch about. Otherwise how can you use a "Settings..." submenu to configure environment variables which are used by other menu entries for booting? The analogy with bash is not useful here.