From: "Q. Gylstorff" <Quirin.Gylstorff@siemens.com>
To: henning.schild@siemens.com, isar-users@googlegroups.com,
jan.kiszka@siemens.com
Subject: [PATCH] sshd-regen-keys: Disable service after it run once
Date: Thu, 18 Nov 2021 12:50:25 +0100 [thread overview]
Message-ID: <20211118115025.182309-1-Quirin.Gylstorff@siemens.com> (raw)
From: Quirin Gylstorff <quirin.gylstorff@siemens.com>
sshd-regen-keys is executed every time the system boots.
This leads to new system ssh keys every boot.
Revert to the behavior to before
commit d700bf83042c57efdc4f4721f56d078433ce6b1d sshd-regen-keys: Improve service, make more robust
and disable the service after it was executed.
Signed-off-by: Quirin Gylstorff <quirin.gylstorff@siemens.com>
---
.../sshd-regen-keys/files/sshd-regen-keys.service | 1 +
.../{sshd-regen-keys_0.4.bb => sshd-regen-keys_0.5.bb} | 0
2 files changed, 1 insertion(+)
rename meta/recipes-support/sshd-regen-keys/{sshd-regen-keys_0.4.bb => sshd-regen-keys_0.5.bb} (100%)
diff --git a/meta/recipes-support/sshd-regen-keys/files/sshd-regen-keys.service b/meta/recipes-support/sshd-regen-keys/files/sshd-regen-keys.service
index 5c2ccff7..b38e6edc 100644
--- a/meta/recipes-support/sshd-regen-keys/files/sshd-regen-keys.service
+++ b/meta/recipes-support/sshd-regen-keys/files/sshd-regen-keys.service
@@ -11,6 +11,7 @@ ConditionPathIsReadWrite=/etc
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/bin/ssh-keygen -A
+ExecStartPost=-/bin/systemctl disable sshd-regen-keys.service
[Install]
WantedBy=sysinit.target
diff --git a/meta/recipes-support/sshd-regen-keys/sshd-regen-keys_0.4.bb b/meta/recipes-support/sshd-regen-keys/sshd-regen-keys_0.5.bb
similarity index 100%
rename from meta/recipes-support/sshd-regen-keys/sshd-regen-keys_0.4.bb
rename to meta/recipes-support/sshd-regen-keys/sshd-regen-keys_0.5.bb
--
2.30.2
next reply other threads:[~2021-11-18 11:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-18 11:50 Q. Gylstorff [this message]
2021-11-18 12:59 ` Henning Schild
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211118115025.182309-1-Quirin.Gylstorff@siemens.com \
--to=quirin.gylstorff@siemens.com \
--cc=henning.schild@siemens.com \
--cc=isar-users@googlegroups.com \
--cc=jan.kiszka@siemens.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox