diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2020-08-08 10:34:56 +0200 |
---|---|---|
committer | Michael Olbrich <m.olbrich@pengutronix.de> | 2020-08-14 14:24:52 +0200 |
commit | 99931412f758783a6d27bd8df3119bb3ce1e0aa6 (patch) | |
tree | 2c8eea8e5199066ba670e7542d1c013f17ae0353 /projectroot | |
parent | 0a4f1ee4ed231a4e95dad545ba52ed2679e122ec (diff) | |
download | ptxdist-99931412f758783a6d27bd8df3119bb3ce1e0aa6.tar.gz ptxdist-99931412f758783a6d27bd8df3119bb3ce1e0aa6.tar.xz |
openssh/rc-once: use fixed string grep to match filename
This is a (very) minor optimisation. There is no semantical change as
the fixed list of possible filenames doesn't contain anything that has a
different meaning when interpreted as a regex, still I consider it
better style to interpret the filename as a fixed string to match.
Both busybox and the "big" grep support -F unconditionally so there is
no problem in using -F.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Message-Id: <20200808083456.26483-2-u.kleine-koenig@pengutronix.de>
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'projectroot')
-rw-r--r-- | projectroot/etc/rc.once.d/openssh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/projectroot/etc/rc.once.d/openssh b/projectroot/etc/rc.once.d/openssh index bfec70641..66cfa06df 100644 --- a/projectroot/etc/rc.once.d/openssh +++ b/projectroot/etc/rc.once.d/openssh @@ -26,7 +26,7 @@ create_key() { file="/etc/ssh/ssh_host_${keytype}_key" - if echo "$hostkeys" | grep -x "$file" >/dev/null; then + 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 |