]> git.ipfire.org Git - thirdparty/dehydrated.git/commitdiff
Add missing checks and fix hexdump output (closes #878)
authorKrayon <krayon.git@qdnx.org>
Tue, 7 Jun 2022 07:13:18 +0000 (17:13 +1000)
committerLukas Schauer <lukas@schauer.dev>
Mon, 31 Oct 2022 14:12:04 +0000 (15:12 +0100)
dehydrated

index 5d7a70613c08b635500d958e3f0c42aadbd295c9..a170666997452180f70f146e3fb02698ef658fed 100755 (executable)
@@ -260,7 +260,7 @@ _mktemp() {
 # Check for script dependencies
 check_dependencies() {
   # look for required binaries
-  for binary in grep mktemp diff sed awk curl cut; do
+  for binary in grep mktemp diff sed awk curl cut head tail hexdump; do
     bin_path="$(command -v "${binary}" 2>/dev/null)" || _exiterr "This script requires ${binary}."
     [[ -x "${bin_path}" ]] || _exiterr "${binary} found in PATH but it's not executable"
   done
@@ -839,7 +839,7 @@ hex2bin() {
 
 # Convert binary data to hex string
 bin2hex() {
-  hexdump -e '16/1 "%02x"'
+  hexdump -v -e '/1 "%02x"'
 }
 
 # OpenSSL writes to stderr/stdout even when there are no errors. So just