ref: 6a15ae8dec7b0f374d5b1c401b3fbdaa9cba714e
parent: a5f05c98f690d95374b69ae5405052b250305fdf
author: Natanael Copa <ncopa@alpinelinux.org>
date: Wed Nov 17 06:37:48 CST 2021
init: only install sshd if there are no apkovl User may have chosen dropbear, in which case we don't want install openssh.
--- a/initramfs-init.in
+++ b/initramfs-init.in
@@ -653,6 +653,14 @@
rc_add firstboot default
+ # add openssh
+ if [ -n "$KOPT_ssh_key" ]; then
+ pkgs="$pkgs openssh"
+ rc_add sshd default
+ fi
+fi
+
+
rm -f "$sysroot/etc/.default_boot_services"
fi
@@ -730,12 +738,6 @@
if [ "$KOPT_chart" = yes ]; then
pkgs="$pkgs acct"
-fi
-
-# add openssh
-if [ -n "$KOPT_ssh_key" ]; then
- pkgs="$pkgs openssh"
- rc_add sshd default
fi
# use swclock if no RTC is found