commit: 6c6b3d9b7294a171a7c01ac981fee95cb0e3a94c Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> AuthorDate: Thu Jul 18 17:26:54 2019 +0000 Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> CommitDate: Thu Jul 18 17:26:54 2019 +0000 URL: https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=6c6b3d9b
initrd.scripts: start_sshd(): Don't start sshd when network wasn't started Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org> defaults/initrd.scripts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/defaults/initrd.scripts b/defaults/initrd.scripts index cdd5a2e..bc19fff 100644 --- a/defaults/initrd.scripts +++ b/defaults/initrd.scripts @@ -1829,6 +1829,12 @@ start_sshd() { return fi + if [ ! -f "${GK_NET_LOCKFILE}" ] + then + warn_msg "Network not started; Not starting sshd ..." + return + fi + if [ ! -x "/usr/sbin/dropbear" ] then bad_msg "/usr/sbin/dropbear not found! Did you call genkernel with --ssh parameter?"