[systemd-devel] how can I add a boot parameter to a app which depend on kernel boot option
Umut Tezduyar Lindskog
umut at tezduyar.com
Tue May 13 04:18:58 PDT 2014
Hi Xiong
You can have a script that reads the /proc/cmdline and then calls
exec with your app.
ExecStart=/your/custom/scipt
cat /your/custom/script:
# Do what ever you want, figure out parameters
# Start your application
exec myapp --parameter=xyz
Umut
On Tue, May 13, 2014 at 12:48 PM, zhang xiong <panda0626 at gmail.com> wrote:
> Hi, All:
> I face a problem when I'm using systemd. It's appreciate that someone
> can give me some suggestion.
> I want to boot an app from systemd and this app's boot parameter is
> gotten from /proc/cmdline.
> the boot logic of my app is:
>
> if boot_option = a
> ExecStart=myapp --parameter=value1
> else if boot_option = b
> ExecStart=myapp --parameter=value2
>
> how can I implement this logic in myapp.service ?
>
> thanks
>
> _______________________________________________
> systemd-devel mailing list
> systemd-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/systemd-devel
>
More information about the systemd-devel
mailing list