From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1I2Jce-0007K7-3e for mharc-grub-devel@gnu.org; Sun, 24 Jun 2007 00:22:48 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1I2Jcc-0007Jz-6u for grub-devel@gnu.org; Sun, 24 Jun 2007 00:22:46 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1I2Jca-0007IQ-JI for grub-devel@gnu.org; Sun, 24 Jun 2007 00:22:44 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I2Jca-0007IN-DW for grub-devel@gnu.org; Sun, 24 Jun 2007 00:22:44 -0400 Received: from m15-112.126.com ([220.181.15.112]) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1I2JcZ-0007Z6-1B for grub-devel@gnu.org; Sun, 24 Jun 2007 00:22:44 -0400 Received: from localhost (unknown [123.49.201.18]) by smtp2 (Coremail) with SMTP id wKjJDLAL1wSN8X1Gks6aAw==.22387S2; Sun, 24 Jun 2007 12:22:37 +0800 (CST) Date: Sun, 24 Jun 2007 12:22:18 +0800 From: Bean To: The development of GRUB 2 Message-ID: <20070624042218.GA8436@ws3.vdp.com> References: <46752D5B.1000001@nic.fi> <87abuqomkl.fsf@xs4all.nl> <20070623143127.GA2433@ws3.vdp.com> <87645eohbj.fsf@xs4all.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87645eohbj.fsf@xs4all.nl> User-Agent: Mutt/1.5.13 (2006-08-11) X-Coremail-Antispam: 1U3Yxn0WfASr-VFAUDIcSsGvfJTRUUUjbAFxVCF77xC6IxKo4 kEV4ylnxkEFVAIw20F6cxK64vIFxWlx4CE17CEb7AF67AKxVWUJVWUXwCjxxvEw4Wle4C2 67I2x7xF54xIwI1lYx0E2Ix0cI8IcVAFwI0_Jr0_Jr4l4x8a6c8ajcxJMcIj6I8E87Iv67 AKxVWUJVW8JwAFxVCaYxvI4VCIwcAKzIAtMxkI7II2jI8vz4vEwIxGrwCY02Avz4vE14v_ Gryl14x267AKxVWUJVW8JwAYFVCjjxCrM7CIcVAFz4kK6r1j6r18Mc02F40EFcxC0VAKzV Aqx4xG6I80ewCY1Ik26cxK620vw7xCY7Wlc7Ca8VAvwVCjb41lb7Iv0xC_CrUanT9S1TB7 1UUUUUUa7-sFnT9fnUUI43ZEXa7IUYj9aPUUUUUFnT9fnV15pF1fCrW7Kr47Zw1UCF4xAF 1rXoXrpr45KFb_XrZ2y34kJw45CFs2qw129rWYvF4UGwsxJ34DXw1UX3WYyF9Yk39xCr92 yryvvr13XF42yrZ0krn5twnrZw1av X-detected-kernel: Linux 2.6, seldom 2.4 (older, 4) Subject: Re: status update for grub 2 developments? X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jun 2007 04:22:46 -0000 Some bugs I found on scripting. 1. token parser echo aa"bb" aabb (correct) echo aa"bb"cc aabb (cc is lost) echo aa$prefix aa (hd0,1)/boot/grub (should be one token) echo $prefix/grub.cfg (hd0,1)/boot/grub /grub.cfg (should be one token) The problem here is that when a variable is mixed with text, the token breaks. I think this is also the reason why set doesn't work with variable. set AA=1 set BB=$AA will expand to set AA=1 set BB= 1 Thereforce the value of BB is empty instead of 1. 2. function There are a lot of problem with function. I put this in grub.cfg: function aa { set AA=gfxterm insmod $AA } And grub goes into an infinite loop: syntax error Incorrect command syntax error Incorrect command ... But if I rewrite the function as function aa { set AA=gfxterm insmod ${AA} } It display the menu properly. Howerver, when I go to the grub console, and enter aa, it says: error: unknown command `aa' and lsmod shows no gfxterm module. If I use aa before the first menuentry, the menu is not even displayed ! I put anothe function in grub.cfg: function bb { ls (hd0,1)/ } enter console mode, enter bb: error: unknown command `ls' After this, ls command will fail. Howerver, if I use ls before bb, it says: error: unknow device Later use of the ls command works. Note: ls is not bundled in core.img. Another function: function cc { set AA=1 echo ${AA} } This is similar to the bb example. If I use echo before cc, it says: 1 error: unknown command `cc' If I use cc directly, it says: error: unknow command `echo' And later use of echo will fail. -- Bean