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

partman recipe to conditionalize a partition



Hi,

I'm trying to write a partman recipe that generates a BIOS boot partition
when installing on gpt (see #488111).  The trick is how not to create it
when msdos label is used.  Frans suggested (on IRC) to add a "gptonly" tag,
that would act similarly to "{default,lvm,etc}ignore" ones.

The latter are parsed in recipes.sh:decode_recipe(), based on the chosen
method.  So I thought of doing the same.

Unfortunately, the first few times decode_recipe() is called, label isn't
determined yet (queriing the server returns "unknown").  It can't be predicted
what it'll be, because it depends on user input.

So perhaps an option would be to pass the "gptonly" flag down to the scheme
in decode_recipe() instead of using it for decoding itself, so that this
information lives longer up to whereever it's going to be used for filtering
the partition.

Thoughts?

-- 
Robert Millan

<GPLv2> I know my rights; I want my phone call!
<DRM> What good is a phone call… if you are unable to speak?
(as seen on /.)


Reply to: