From: Gylstorff Quirin <quirin.gylstorff@siemens.com>
To: Henning Schild <henning.schild@siemens.com>
Cc: isar-users@googlegroups.com
Subject: Re: [PATCH v2] sshd-regen-keys: do not enable ssh server if previously disabled
Date: Thu, 25 Feb 2021 08:36:02 +0100 [thread overview]
Message-ID: <56c9e8ad-e1af-b8a7-e778-f8ffd4d0d426@siemens.com> (raw)
In-Reply-To: <20210224213248.55b6ad55@md1za8fc.ad001.siemens.net>
On 2/24/21 9:32 PM, Henning Schild wrote:
> Am Wed, 24 Feb 2021 21:26:12 +0100
> schrieb "[ext] Henning Schild" <henning.schild@siemens.com>:
>
>> Am Wed, 24 Feb 2021 14:41:45 +0100
>> schrieb "[ext] Q. Gylstorff" <Quirin.Gylstorff@siemens.com>:
>>
>>> From: Quirin Gylstorff <quirin.gylstorff@siemens.com>
>>>
>>> The code 'test -n $SSHD_ENABLED' always returns "0" and enables ssh
>>> even if deactivated previously.
>>>
>>> Signed-off-by: Quirin Gylstorff <quirin.gylstorff@siemens.com>
>>> ---
>>> Changes V2:
>>> add missing space
>>> 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..50f45eb 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
>>
>> Not sure i understand that. But i guess 'test -n "$SSHD_ENABLED"'
>> would also work, so we are looking at a quoting problem and the whole
>> [] is just syntactic sugar.
>>
>> Sugar i would approve, just asking.
>
> If it is all about quoting, maybe the commit message can be improved to
> reflect that.
>
> Henning
It is a quoting problem. I will add some text to the commit message and
send a v3.
Quirin
>
>> Henning
>>
>>> echo "Reenabling ssh server ..."
>>> systemctl enable --no-reload ssh
>>> fi
>>
>
next prev parent reply other threads:[~2021-02-25 7:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-24 13:32 [PATCH] " Q. Gylstorff
2021-02-24 13:41 ` [PATCH v2] " Q. Gylstorff
2021-02-24 20:26 ` Henning Schild
2021-02-24 20:32 ` Henning Schild
2021-02-25 7:36 ` Gylstorff Quirin [this message]
2021-02-24 13:45 ` [PATCH] " florian.bezdeka
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56c9e8ad-e1af-b8a7-e778-f8ffd4d0d426@siemens.com \
--to=quirin.gylstorff@siemens.com \
--cc=henning.schild@siemens.com \
--cc=isar-users@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox