From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6932823963683782656 X-Received: by 2002:a2e:b0e1:: with SMTP id h1mr13588436ljl.436.1614173865473; Wed, 24 Feb 2021 05:37:45 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:6512:3993:: with SMTP id j19ls1696414lfu.3.gmail; Wed, 24 Feb 2021 05:37:44 -0800 (PST) X-Google-Smtp-Source: ABdhPJyy+5+KS6Oc++BAqXNXjI53DJRazBFX5deANmWOe88S5pOsuvdBE6d77AItGjt4JwqcO1Ka X-Received: by 2002:a05:6512:74a:: with SMTP id c10mr3904978lfs.586.1614173864170; Wed, 24 Feb 2021 05:37:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614173864; cv=none; d=google.com; s=arc-20160816; b=KzvT8THSK74lEg0KZSZzYdsSyL4cqT4c0oa/HMUojOxVoPrWhh7v3k7sxtAggS2IXX jPG57X5Fyawx+tHzZPyMg+VDMzNaypL3WlY+3imHDgiNp8W/6YYaZ03TJ9sUPwbfOcan 6G5z4zR4E/92vTX7J4kB+ZERpP6E7c8KfCdq8XHN8J2EQRhCFW6qpQPbvEHzFindPZbc KwAOHWxJFArros3Wb24pyHI+XVagin7MWi/ed9rhwcpYCA5bAhJUKdmaL6IdoEOM1ioJ bSw86Y3KHpvONZ6/qM8bVUk1FDopVnZP7pbO8GMOQXQ2VLEl+rHB8wBtUKLXMP//Ncku NJjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from; bh=rtfxwh7zyVj+8UBm3Clk0QJ08VZDHvU6yk5ybZaEiYk=; b=L69rTzF4Ar5YTFfa5Fy9JZkEBKFm7hTqJJRuf8gGHGT9ad5bCqTU5s66aofcONiQ5r YP3Ztr+HclQgbHcd31lWYl9MDy7FLNZcW/UTc81w25sc6/vt2bbAJNsU8FrcPUq58uk6 q8FHIutkr/BxvjLtcQhNQ/NMUv4Zx31LJFsSCszcCMIDIM4YUDNdLfbzHE1X7I5a7sCO ZQonz3rg63Pr0Lx9KbuIXCXK3r/UOfd9A0Jjd7PjdZcamn/WcbcQ1XvsfSVi13Ou9kn/ uudxmFLRmiTiIXnY/31okY8zwytQGm0ZnReTOPhVDzL6WARiIiFs8lI6udMr4l6nK4ZL TMHw== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of quirin.gylstorff@siemens.com designates 194.138.37.39 as permitted sender) smtp.mailfrom=Quirin.Gylstorff@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Return-Path: Received: from lizzard.sbs.de (lizzard.sbs.de. [194.138.37.39]) by gmr-mx.google.com with ESMTPS id g12si71410lfu.13.2021.02.24.05.37.43 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 24 Feb 2021 05:37:44 -0800 (PST) Received-SPF: pass (google.com: domain of quirin.gylstorff@siemens.com designates 194.138.37.39 as permitted sender) client-ip=194.138.37.39; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of quirin.gylstorff@siemens.com designates 194.138.37.39 as permitted sender) smtp.mailfrom=Quirin.Gylstorff@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Received: from mail1.sbs.de (mail1.sbs.de [192.129.41.35]) by lizzard.sbs.de (8.15.2/8.15.2) with ESMTPS id 11ODbhoD021254 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 24 Feb 2021 14:37:43 +0100 Received: from md2dvrtc.fritz.box ([167.87.19.31]) by mail1.sbs.de (8.15.2/8.15.2) with ESMTP id 11ODWgX1020556; Wed, 24 Feb 2021 14:32:43 +0100 From: "Q. Gylstorff" To: isar-users@googlegroups.com Cc: Quirin Gylstorff Subject: [PATCH] sshd-regen-keys: do not enable ssh server if previously disabled Date: Wed, 24 Feb 2021 14:32:42 +0100 Message-Id: <20210224133242.30108-1-Quirin.Gylstorff@siemens.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TUID: /vV2729/x6Dp From: Quirin Gylstorff The code 'test -n $SSHD_ENABLED' always returns "0" and enables ssh even if deactivated previously. Signed-off-by: Quirin Gylstorff --- meta/recipes-support/sshd-regen-keys/files/sshd-regen-keys.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/recipes-support/sshd-regen-keys/files/sshd-regen-keys.sh b/meta/recipes-support/sshd-regen-keys/files/sshd-regen-keys.sh index 910d879..efcff3e 100644 --- a/meta/recipes-support/sshd-regen-keys/files/sshd-regen-keys.sh +++ b/meta/recipes-support/sshd-regen-keys/files/sshd-regen-keys.sh @@ -12,7 +12,7 @@ rm -v /etc/ssh/ssh_host_*_key* echo "Regenerating keys ..." dpkg-reconfigure openssh-server -if test -n $SSHD_ENABLED; then +if [-n "$SSHD_ENABLED" ]; then echo "Reenabling ssh server ..." systemctl enable --no-reload ssh fi -- 2.20.1