diff options
author | Ben Hutchings <ben@decadent.org.uk> | 2018-07-30 14:35:08 +0800 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2018-07-30 14:35:08 +0800 |
commit | 942f1d2d175b3b4f355554835f576adfb98cdc94 (patch) | |
tree | 216f96e815b386b8e72e882a1739eed2c5a307c2 | |
parent | d1e206661c18cf381a259e6c86492b54385179e0 (diff) |
unmkinitramfs, lsinitramfs: Avoid zcat compatibility issue by running gzip
zutils provides an alternate implementation of zcat which has a
different interpretation of the -t option. This has been fixed in
Debian unstable by installing its zcat under a different name.
However, we can avoid this problem even on systems with the older
version by running gzip instead of zcat.
Closes: #903931
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
-rwxr-xr-x | unmkinitramfs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/unmkinitramfs b/unmkinitramfs index bd7bacf..910558b 100755 --- a/unmkinitramfs +++ b/unmkinitramfs @@ -14,8 +14,8 @@ xcpio() dir="$2" shift 2 - if zcat -t "$archive" >/dev/null 2>&1 ; then - zcat "$archive" + if gzip -t "$archive" >/dev/null 2>&1 ; then + gzip -c -d "$archive" elif xzcat -t "$archive" >/dev/null 2>&1 ; then xzcat "$archive" elif lz4cat -t "$archive" >/dev/null 2>&1 ; then |