[systemd-devel] [Feature request] A way to native import /proc/cmdline within unit
Gerardo Exequiel Pozzi
vmlinuz386 at yahoo.com.ar
Thu Jul 25 15:35:03 PDT 2013
On 07/25/2013 05:06 PM, Lennart Poettering wrote:
> On Sat, 20.07.13 16:37, Gerardo Exequiel Pozzi (vmlinuz386 at yahoo.com.ar) wrote:
>
>> Hello
>>
>> I am maintainer of Archiso project (The Arch Linux live ISO creator).
>>
>> I like a feature for systemd within unit files, mainly for importing
>> /proc/cmdline in initramfs stage, or in a generic form for any other
>> file with a similar format. Something like ImportOneLineFile=, like
>> current EnvironmentFile=.
>>
>> In this way, we can use/pass parameters to Exec*= directives if needed.
>
> So you awant to import kernel cmdline arguments into your environment?
Yes, in a particular unit.
> Note that you can do that already with the systemd.setenv= kernel
> command line option. What else do you need?
>
Yes. But doing in this way:
* Makes each variable passed, global to all units.
* For each parameter that I need to process I need to prefix them.
So for example
archisobasedir=arch archisolabel=ARCH_201307 checksum=y
becomes:
systemd.setenv=archisobasedir=arch
systemd.setenv=archisolabel=ARCH_201307 systemd.setenv=checksum=y
And if booting via PXE, think about automatic cmdline appended by
"ip=..." PXELINUX/IPAPPEND...
The other solution that I have is using a service+script for
parsing/dumping cmdline in a file, then import with EnvironmentFile= but
does not look good. Other way maybe is using a generator, but they run
too early and I need to wait for some things happens before generating
units in a dynamic way.
> Lennart
>
Thanks for your attention.
--
Gerardo Exequiel Pozzi
\cos^2\alpha + \sin^2\alpha = 1
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 555 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20130725/79acfd24/attachment.pgp>
More information about the systemd-devel
mailing list