From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mout.kundenserver.de ([212.227.126.130]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k7gD4-0004w8-CD for ptxdist@pengutronix.de; Mon, 17 Aug 2020 16:34:03 +0200 Date: Mon, 17 Aug 2020 16:33:52 +0200 From: Alexander Dahl Message-ID: <20200817143351.ayh67pdrfrhwenzc@falbala.internal.home.lespocky.de> References: <20200817140802.1471-1-christian.hermann@hytera.de> MIME-Version: 1.0 In-Reply-To: <20200817140802.1471-1-christian.hermann@hytera.de> Subject: Re: [ptxdist] [PATCH] openssh/rc-once: fix minor bug and cleanup List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Content-Type: multipart/mixed; boundary="===============1527749850==" Errors-To: ptxdist-bounces@pengutronix.de Sender: "ptxdist" To: ptxdist@pengutronix.de Cc: Christian Hermann --===============1527749850== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="3gum2775dmf56zns" Content-Disposition: inline --3gum2775dmf56zns Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello Christian, On Mon, Aug 17, 2020 at 04:08:02PM +0200, Christian Hermann wrote: > * `$_type` does not exist, resulting in empty variable. > Fixup of 0a4f1ee4d. There's no such changeset in public ptxdist master. There is however 0a4f1ee4ed231a4e95dad545ba52ed2679e122ec and could you please add a proper fixes line, if you already did the research to find out that hash? e.g. Fixes: 0a4f1ee4ed23 ("openssh/rc-once: deduplicate some data") Greets Alex > * apply issues reported by shellcheck and shfmt > * drop command concatenation for key creation, because why would you want > to miss out on ed25519 keys if the previous keys couldn't be > generated? >=20 > Signed-off-by: Christian Hermann > --- > projectroot/etc/rc.once.d/openssh | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) >=20 > diff --git a/projectroot/etc/rc.once.d/openssh b/projectroot/etc/rc.once.= d/openssh > index 66cfa06df..4a8dd26b0 100644 > --- a/projectroot/etc/rc.once.d/openssh > +++ b/projectroot/etc/rc.once.d/openssh > @@ -19,7 +19,7 @@ host_keys_required() { > =20 > create_key() { > keytype=3D"$1" > - prettykeytype=3D"$(echo $_type | tr a-z A-Z)" > + prettykeytype=3D"$(echo "$keytype" | tr '[:lower:]' '[:upper:]')" > shift > hostkeys=3D"$1" > shift > @@ -28,8 +28,8 @@ create_key() { > =20 > if echo "$hostkeys" | grep -x -F "$file" >/dev/null; then > echo "Create $prettykeytype key; this may take some time ..." > - rm -f $file && > - ssh-keygen -q -f "$file" -N '' -t "$keytype" "$@" || return > + rm -f "$file" && > + ssh-keygen -q -f "$file" -N '' -t "$keytype" "$@" || return > echo "Created $prettykeytype key." > fi > } > @@ -37,9 +37,9 @@ create_key() { > create_keys() { > hostkeys=3D"$(host_keys_required)" > =20 > - create_key "dsa" "$hostkeys" && > - create_key "ecdsa" "$hostkeys" && > - create_key "ed25519" "$hostkeys" && > + create_key "dsa" "$hostkeys" > + create_key "ecdsa" "$hostkeys" > + create_key "ed25519" "$hostkeys" > create_key "rsa" "$hostkeys" -b 4096 > } > =20 > --=20 > 2.28.0 >=20 >=20 > _______________________________________________ > ptxdist mailing list > ptxdist@pengutronix.de > To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request= @pengutronix.de --=20 /"\ ASCII RIBBON | =BBWith the first link, the chain is forged. The first \ / CAMPAIGN | speech censured, the first thought forbidden, the X AGAINST | first freedom denied, chains us all irrevocably.=AB / \ HTML MAIL | (Jean-Luc Picard, quoting Judge Aaron Satie) --3gum2775dmf56zns Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEwo7muQJjlc+Prwj6NK3NAHIhXMYFAl86lUwACgkQNK3NAHIh XMbbBw//aIn/Iq52RUztev1Oerds3Q/n4XOalZnedIQxdLwf7qC7o9MCypKj1ypP 9dkWq88u5WhvzuwxxbkjL3SFYmYAD/9k284ONa2dPhJbBwZk874nMyA3/BBjUIEL oGudtsmu8QlxqsjRPeXG4gtXAUWiFXPheR+EEhdNL8Frok9GbXajJvDkZJeE50J4 q8Rnj6LnD6s13trytwTjr95JQEYWHMe6fvl2VzalnpDVH4ihZT3ZolAHXA0429B2 UAGh08ZNKFugwDsccqQz7k5SpJ+awPuKCUmP3qzYsNR9JnUE2NX8yU6svPeBhjEm Av7urJODe7BflwtxGTXumxiHBBNOwyBOc1daY3fYcQfoB6+iOJPXvUMpAtvPyx7o fxXwXbNorgtKdStNOt2mtbdRuHCsW5ah2lUpXO83mBwxCQ+231COvtmMWw1JktRJ k0xesOJV29KqNJD8x7uGMNs3C7/c0XBHL1IU7QrwZNqta9bTukvx6P42ennKu2uX qwwwTXyRifqNN/4DbYeaz7GCHnQjYOhqsTd/rJRw8trfH7hgC21hedsBUlfNUPk+ B/Kcu4QNmNGuqiRqdi9ge8EWZSurWZcbfLcec6qQ7eVwGLH9ZMd9rAdAebLJzZ7U u1LI1O5Qy0KivX6RBQUuFpGmezvQn96ndZnyaMkjq92o7U5vyR0= =93yv -----END PGP SIGNATURE----- --3gum2775dmf56zns-- --===============1527749850== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de --===============1527749850==--