Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Open source
IQRF Yocto Layer
Commits
81ab90a4
Commit
81ab90a4
authored
Mar 11, 2021
by
Marek Belisko
Browse files
openssh: Added condition for service startup
Signed-off-by:
Marek Belisko
<
marek.belisko@open-nandra.com
>
parent
bff8971a
Changes
2
Hide whitespace changes
Inline
Side-by-side
recipes-connectivity/openssh/openssh/ssh.service
View file @
81ab90a4
...
...
@@ -3,6 +3,7 @@ Description=OpenBSD Secure Shell server
After
=
network.target auditd.service
Wants
=
sshdgenkeys.service
After
=
sshdgenkeys.service
ConditionPathExists
=
/data/systemd/service/ssh/enabled
[Service]
EnvironmentFile
=
-/etc/default/ssh
...
...
recipes-connectivity/openssh/openssh_%.bbappend
View file @
81ab90a4
...
...
@@ -14,12 +14,17 @@ do_install_append() {
${D}${sysconfdir}/systemd/system/multi-user.target.wants/sshdgenkeys.service
# Create config files for read-only rootfs (store it in data)
install -d ${D}${sysconfdir}/ssh
install -m 644 ${D}${sysconfdir}/ssh/sshd_config ${D}${sysconfdir}/ssh/sshd_config_readonly
sed -i '/HostKey/d' ${D}${sysconfdir}/ssh/sshd_config_readonly
install -d ${D}${sysconfdir}/ssh
install -m 644 ${D}${sysconfdir}/ssh/sshd_config ${D}${sysconfdir}/ssh/sshd_config_readonly
sed -i '/HostKey/d' ${D}${sysconfdir}/ssh/sshd_config_readonly
echo "HostKey /data/ssh/ssh_host_rsa_key" >> ${D}${sysconfdir}/ssh/sshd_config_readonly
echo "HostKey /data/ssh/ssh_host_ecdsa_key" >> ${D}${sysconfdir}/ssh/sshd_config_readonly
echo "HostKey /data/ssh/ssh_host_ed25519_key" >> ${D}${sysconfdir}/ssh/sshd_config_readonly
# create directory for enable/disable service file
install -d ${D}/data/systemd/service
}
SYSTEMD_SERVICE_${PN}-sshd = "sshdgenkeys.service"
SYSTEMD_SERVICE_${PN}-sshd = "sshdgenkeys.service ssh.service"
FILES_${PN} += "/data/*"
Marek Beliško
@beliskom
mentioned in commit
525399bf
·
Mar 15, 2021
mentioned in commit
525399bf
mentioned in commit 525399bfeaf3b3228893d93cfcf20554188aa530
Toggle commit list
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment