Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make ssh key generation in recovery system also work for SysVinit #1612

Conversation

jsmeix
Copy link
Member

@jsmeix jsmeix commented Nov 30, 2017

See
#1512 (comment)
and subsequent comments, in particular see
#1512 (comment)
but I decided to keep the

if grep -q '^ssh:' /etc/inittab ; then

in skel/default/etc/scripts/run-sshd
because as far as I understand it a
"ssh:23:respawn:..." entry in /etc/inittab is written by
rescue/default/500_ssh.sh only if sshd should be started.

@jsmeix jsmeix added enhancement Adaptions and new features minor bug An alternative or workaround exists labels Nov 30, 2017
@jsmeix jsmeix added this to the ReaR v2.3 milestone Nov 30, 2017
@jsmeix jsmeix self-assigned this Nov 30, 2017
@jsmeix
Copy link
Member Author

jsmeix commented Nov 30, 2017

Because it works well for me both on SLES11 and SLES12
I would like to merge it soon unless there are objections.

Copy link
Contributor

@OliverO2 OliverO2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

For an explanation of inittab and systemd.services in this context see #1512 (comment).

@@ -1,16 +1,27 @@
#!/bin/bash
# check inittab for "ssh:23:respawn:/bin/sshd -D"
# Check /etc/inittab for "ssh:23:respawn:..." which means sshd should be started
# (that entry is written by rescue/default/500_ssh.sh if sshd should be started):
if grep -q '^ssh:' /etc/inittab ; then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A bit strange to have a systemd-based initialization depend on init-based stuff, but also reflected in usr/share/rear/skel/default/usr/lib/systemd/system/sshd.service. Maybe something for a future cleanup.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is so much to clean up in ReaR, even crucial things, e.g.
#1603 (comment)

@jsmeix
Copy link
Member Author

jsmeix commented Nov 30, 2017

@OliverO2
many thanks for your prompt review!

@jsmeix jsmeix merged commit 1a1d61b into rear:master Nov 30, 2017
@jsmeix jsmeix deleted the make_ssh_key_generation_also_work_for_SysVinit_issue1512 branch November 30, 2017 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Adaptions and new features fixed / solved / done minor bug An alternative or workaround exists
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants