From: Grégoire Jadi Date: Mon, 19 Feb 2018 16:45:03 +0000 (+0100) Subject: Replace head -c by dd X-Git-Tag: 0.5.3~7 X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=97c58315e5e53c1605b73cbf6039a4e16a63c3c8;p=keyringer.git Replace head -c by dd The '-c' (count bytes) option is not a POSIX.1 option, therefore it is not available on OpenBSD. Replace 'head -c' with 'dd'. Signed-off-by: Silvio Rhatto --- diff --git a/lib/keyringer/actions/pwgen b/lib/keyringer/actions/pwgen index 5f25447..ab5cb84 100755 --- a/lib/keyringer/actions/pwgen +++ b/lib/keyringer/actions/pwgen @@ -18,7 +18,7 @@ function keyringer_pwgen { # Strip possible newlines if output is wrapped. # Also strip trailing = signs as they add nothing to the password's entropy. - head -c $ENTROPY_BYTES $ENTROPY_SOURCE | base64 | tr -d '\n=' + dd bs=1 count=$ENTROPY_BYTES if=$ENTROPY_SOURCE | base64 | tr -d '\n=' echo }