Hi,
> On 08/03/2018 17:29, jan wrote:
> > It could be I'm still missing some pieces of information, but I've got a
> > problem/question.
> >
> > I have build swupdate with yocto (@master).
> > And I see in the swupdate.service file that it wants to execute
> > 'swupdate-env'
> >
> > [Service]
> > ExecStartPre=-/usr/bin/swupdate-env
> > EnvironmentFile=-/tmp/swupdate.env
> > ExecStart=/usr/bin/swupdate -v -w "-r /www" $SWUPDATE_EXTRA_ARGS
> >
> >
> > However, I can not find the 'swupdate-env'.
>
> mmhhh...me too !
>
> > Not in my build, and (until now) in the the source code (@master).
>
> It was pushed since first beginning when support for systemd was added.
> Reason is to have a way to set SWUPDATE_EXTRA_ARGS, but there is no
> swupdate-env at all in the repo.
Not only this but also other environment variables like, e.g., proxy
settings and what else you can think of should be put in the environment.
> I have not seen any error by starting,
Yes, that's what the `-` prepended is for, to prevent errors on the two
missing. If you place them in your image, the environment gets picked up.
> but I replace in most projects swupdate.service with a custom one.
True, that's how it's supposed to be I guess. After all, these are just
examples -- that should work, of course.
> It can be dropped.
It could, but it shows how to put something in the service's environment
via systemd. We may drop it and document it or rely on systemd's
documentation for this. I have no strong feelings about it. I just
wanted to show how that could be done in the .service file.
Kind regards,
Christian
--
Dr. Christian Storm
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Otto-Hahn-Ring 6, 81739 München, Germany