aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrégoire Jadi <gjadi@omecha.info>2018-02-19 17:45:03 +0100
committerSilvio Rhatto <rhatto@riseup.net>2018-05-30 13:23:16 -0300
commit97c58315e5e53c1605b73cbf6039a4e16a63c3c8 (patch)
tree526e14a90bb0ee658aeae7450b3644ab7bc67d9a
parentffe513c0a851cbdd42ec458def9be15551d03e6e (diff)
downloadkeyringer-97c58315e5e53c1605b73cbf6039a4e16a63c3c8.tar.gz
keyringer-97c58315e5e53c1605b73cbf6039a4e16a63c3c8.tar.bz2
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 <rhatto@riseup.net>
-rwxr-xr-xlib/keyringer/actions/pwgen2
1 files changed, 1 insertions, 1 deletions
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
}