grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [GITGRUB] Support PXE option and new command pxecfg


From: Vladimir 'phcoder' Serbinenko
Subject: Re: [GITGRUB] Support PXE option and new command pxecfg
Date: Fri, 16 Oct 2009 19:30:03 +0200
User-agent: Mozilla-Thunderbird 2.0.0.22 (X11/20090701)

Bean wrote:
> On Sat, Oct 17, 2009 at 12:47 AM, Vladimir 'phcoder' Serbinenko
> <address@hidden> wrote:
>   
>> Bean wrote:
>>     
>>> On Fri, Oct 16, 2009 at 11:26 PM, Vladimir 'phcoder' Serbinenko
>>> <address@hidden> wrote:
>>>
>>>       
>>>> Hello. Could you send this as a patch?
>>>>
>>>>         
>>> Hi,
>>>
>>> This function depends on my menu branch, it can't be applied to svn
>>> head, so patch file is not very useful.
>>>
>>>
>>>       
>> Could you explain me why PXE depends on menu?
>>     
>
> Hi,
>
> The pxecfg command use the the same config file parser as menu.
>   
Could you perhaps send only the part without pxecfg then?
>   
>>>> Bean wrote:
>>>>
>>>>         
>>>>> Hi,
>>>>>
>>>>> Extends pxe command:
>>>>>
>>>>> -i (--info)  now shows mac and dhcp options
>>>>> -e (--export)  export a dhcp option as grub variable, for example:
>>>>>
>>>>> pxe -e 150
>>>>>
>>>>>
>>>>>
>>>>>           
>>>> Why can't this be exported unconditionally on pxe system startup?
>>>>
>>>>         
>>> Right, perhaps we can export PXE_IP, PXE_MAC and PXE_150 by default,
>>> but this function is also useful in case we need to use other string
>>> option.
>>>
>>>
>>>       
>> Is it possible just enumerate all available options and export them to
>> PXE.<option name> similarly to how we treat FreeBSD environment
>>     
>
> Most DHCP option are binary format, only string option can be exported
> as variable.
>
>   
We can export these ones as hex
>>>>> Set variable PXE_150 to the value of dhcp option 150, you can then use
>>>>> command like source to load it:
>>>>>
>>>>> source ${PXE_150}
>>>>>
>>>>> New command pxecfg, which allows you to run a command based on current 
>>>>> ip/mac:
>>>>>
>>>>> pxecfg /pxe.txt
>>>>>
>>>>>
>>>>>
>>>>>           
>>>> What's wrong with standard if? I would prefer to extend "if" if
>>>> necessary rather than having ad-hoc command for every condition (later
>>>> is inexpandable)
>>>>
>>>>         
>>> IIRC the test command can't compare partial string.
>>>
>>>
>>>       
>> We need an improvement to test command then. What about having
>> test <string> -regexp <regexp>
>>     
>
> I think that's a little overkill, regular expression parser can be
> quite complex.
>
>   
We don't need to reinvent the wheel. We can import regexp parser from
GNU sed


-- 
Regards
Vladimir 'phcoder' Serbinenko
Personal git repository: http://repo.or.cz/w/grub2/phcoder.git 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]