On 26.10.23 09:04, Yu, Mingli via lists.openembedded.org wrote: > From: Mingli Yu <mingli...@windriver.com> > > Don't hardcode the directory of the binary in sshd.service. > > Signed-off-by: Mingli Yu <mingli...@windriver.com> > --- > meta/recipes-connectivity/openssh/openssh/sshd.service | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/meta/recipes-connectivity/openssh/openssh/sshd.service > b/meta/recipes-connectivity/openssh/openssh/sshd.service > index 6ace67d8ae..2a997b656a 100644 > --- a/meta/recipes-connectivity/openssh/openssh/sshd.service > +++ b/meta/recipes-connectivity/openssh/openssh/sshd.service > @@ -6,7 +6,7 @@ After=sshdgenkeys.service > [Service] > Environment="SSHD_OPTS=" > EnvironmentFile=-/etc/default/ssh > -ExecStartPre=/usr/bin/mkdir -p /var/run/sshd > +ExecStartPre=@BASE_BINDIR@/mkdir -p /var/run/sshd
How about using `RuntimeDirectory=sshd` or don't hardcode any path and call `ExecStartPre=mkdir -p …` > ExecStart=-@SBINDIR@/sshd -D $SSHD_OPTS > ExecReload=@BASE_BINDIR@/kill -HUP $MAINPID Same here. This would match the example in the Manual page systemd.service(5): ``` ExecReload= Commands to execute to trigger a configuration reload in the service. This argument takes multiple command lines, following the same scheme as described for ExecStart= above. Use of this setting is optional. Specifier and environment variable substitution is supported here following the same scheme as for ExecStart=. One additional, special environment variable is set: if known, $MAINPID is set to the main process of the daemon, and may be used for command lines like the following: ExecReload=kill -HUP $MAINPID ``` > KillMode=process Kind regards Jörg Sommer -- Navimatix GmbH Tatzendpromenade 2 D-07745 Jena Geschäftsführer: Steffen Späthe, Jan Rommeley Registergericht: Amtsgericht Jena, HRB 501480
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#189704): https://lists.openembedded.org/g/openembedded-core/message/189704 Mute This Topic: https://lists.openembedded.org/mt/102195446/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-