diff --git a/lsinitcpio b/lsinitcpio index bcb4a19..d44a714 100755 --- a/lsinitcpio +++ b/lsinitcpio @@ -131,6 +131,12 @@ detect_filetype() { return fi + read -rd '' bytes < <(hexdump -n 4 -e '"%x"' "$1") + if [[ $bytes = 'fd2fb528' ]]; then + echo 'zstd' + return + fi + # still nothing? hrmm, maybe the user goofed and it's a kernel if kver "$1" >/dev/null; then die '%s is a kernel image, not an initramfs image!' "$1"