From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1Wl4IW-0007uW-PF for mharc-grub-devel@gnu.org; Thu, 15 May 2014 18:38:44 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43772) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wkvyy-0004ta-4L for grub-devel@gnu.org; Thu, 15 May 2014 09:46:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wkvyv-00075G-Tp for grub-devel@gnu.org; Thu, 15 May 2014 09:46:00 -0400 Received: from mail-oa0-x22c.google.com ([2607:f8b0:4003:c02::22c]:38839) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wkvyv-00074u-Pz for grub-devel@gnu.org; Thu, 15 May 2014 09:45:57 -0400 Received: by mail-oa0-f44.google.com with SMTP id o6so1260759oag.3 for ; Thu, 15 May 2014 06:45:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=WPh4BXy4qzUcS9H/CwmRcF5NF/b+idr4EKzUTRfX9EY=; b=wON5th+DnCn10p6i1Er5EEzId/oJuSuLZkgi1qWCSX6rp0Z8xtyJJ8Nw9qOcH4X2MU 8kXdAFEtlUJK9WfbeckthiJjptsNtXGB9QZAcwDE1oNo+LYx3+PX2QTtvTQmjdoXI1B7 nPOwROnx1XiZ7QcGAXUktL+Gj7YrMHE2r+sdK60YNAGNigmPF9y3CgTKEJFNP0Z6FGqK pC17TtNneNJP1HYVPUxIr3qnL1Ntz5v3tAx5a9VisRkUpTpDEGLZQHdqQXKhfsJcARNG A+GMMoXK8jWLNXQXR3z9dGzEC6fVNgkQbwf0fjgeW+q/lsLOG5eZvHS77zZ/1cTGmQDX Z4Eg== X-Received: by 10.60.34.40 with SMTP id w8mr10199680oei.60.1400161556701; Thu, 15 May 2014 06:45:56 -0700 (PDT) MIME-Version: 1.0 Received: by 10.76.180.39 with HTTP; Thu, 15 May 2014 06:45:16 -0700 (PDT) From: =?UTF-8?B?5byg6amw?= Date: Thu, 15 May 2014 21:45:16 +0800 Message-ID: Subject: How to use grub2-extra-lua module To: grub-devel@gnu.org Content-Type: multipart/alternative; boundary=089e013c6dc637264904f970846c X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4003:c02::22c X-Mailman-Approved-At: Thu, 15 May 2014 18:38:43 -0400 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: Thu, 15 May 2014 13:46:01 -0000 --089e013c6dc637264904f970846c Content-Type: text/plain; charset=UTF-8 I googled for grub2-lua, but found very few information on it. I can't find an official website for grub2-lua (i.e official stable source code tarball download link), except for a git/bzr clone link. Moreover, I can't find any documentation about grub lua. So I don't know how to use it. I managed to compile grub2 along with lua module, then I boot into grub and type "help lua" to try to get some help info. But it only says that I can use command "lua script_file.lua" to execute the lua script. So I just want to learn the details on how to use lua module. For example, how to execute lua commands in grub.cfg file, how to return the lua execution result to the grub.cfg file, and what APIs does grub provide to the lua module. The reason why I want to use lua module is that I have the need of file system operations in grub (i.e. mv, cp, cd, pwd, mkdir, rm, nano commands). grub2 itself doesn't provide this functionality. Some posts said grub-extra-lua module may provide this feature. So I just want to know how to use grub lua module to operate on files and directories. --089e013c6dc637264904f970846c Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

I googled for grub2-lua, but found very few information on it. I can't = find an official website for grub2-lua (i.e official stable source code tar= ball download link), except for a git/bzr clone link.

Moreover, I can't find any documentation about grub lua. So I don't= know how to use it.

I managed to compile grub2 along with lua module, then I boot into grub and= type "help lua" to try to get some help info. But it only says t= hat I can use command "lua script_file.lua" to execute the lua sc= ript. So I just want to learn the details on how to use lua module. For exa= mple, how to execute lua commands in grub.cfg file, how to return the lua e= xecution result to the grub.cfg file, and what APIs does grub provide to th= e lua module.

The reason why I want to use lua module is that I have the need of file sys= tem operations in grub (i.e. mv, cp, cd, pwd, mkdir, rm, nano commands). gr= ub2 itself doesn't provide this functionality. Some posts said grub-ext= ra-lua module may provide this feature.

So I just want to know how to use grub lua module to operate on files and d= irectories.

--089e013c6dc637264904f970846c--