From 97c58315e5e53c1605b73cbf6039a4e16a63c3c8 Mon Sep 17 00:00:00 2001 From: Grégoire Jadi Date: Mon, 19 Feb 2018 17:45:03 +0100 Subject: 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 --- lib/keyringer/actions/pwgen | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 } -- cgit v1.2.3