diff options
author | Daniel Kahn Gillmor <dkg@fifthhorseman.net> | 2009-04-06 22:32:56 -0400 |
---|---|---|
committer | Daniel Kahn Gillmor <dkg@fifthhorseman.net> | 2009-04-06 22:32:56 -0400 |
commit | c8719b2f757364178ecbe621b027765c8ce58ef4 (patch) | |
tree | 42e4a83cb1f8fb44c29eab6dc1e7fac9ef2c8bd6 /src/share/ma/setup | |
parent | 5df09d935f33477cdd9763c0e9c1ba7c8073aea0 (diff) |
replacing head -c with dd (for portability reasons, see #673)
Diffstat (limited to 'src/share/ma/setup')
-rw-r--r-- | src/share/ma/setup | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/share/ma/setup b/src/share/ma/setup index b453f3c..4c87009 100644 --- a/src/share/ma/setup +++ b/src/share/ma/setup @@ -57,9 +57,9 @@ EOF if [ -z "$CORE_FPR" ] ; then log info "setting up Monkeysphere authentication trust core..." - local CORE_UID=$(printf "Monkeysphere authentication trust core UID (random string: %s)" $(head -c21 </dev/urandom | perl -MMIME::Base64 -ne 'print encode_base64($_)')) + local CORE_UID=$(printf "Monkeysphere authentication trust core UID (random string: %s)" $(dd if=/dev/urandom bs=21 count=1 | perl -MMIME::Base64 -ne 'print encode_base64($_)')) - log debug "generating monkeysphere authentication trust core key ($CORE_KEYLENGTH bits)..." + printf "generating monkeysphere authentication trust core key:\nsize: %d bits\nuid: '%s'\n" "$CORE_KEYLENGTH" "$CORE_UID" | log debug PEM2OPENPGP_USAGE_FLAGS=certify \ PEM2OPENPGP_NEWKEY=$CORE_KEYLENGTH pem2openpgp "$CORE_UID" \ | gpg_core --import \ |