summaryrefslogtreecommitdiffstats
path: root/server/bin/installmodule
diff options
context:
space:
mode:
authorRamón M. Gómez <ramongomez@us.es>2020-09-03 12:29:04 +0200
committerRamón M. Gómez <ramongomez@us.es>2020-09-03 12:29:04 +0200
commit0e3e1674ae6d35ab6af29af96a6f24bfb9179078 (patch)
treeff80289ce51928db489abf74fef3251fb10a8230 /server/bin/installmodule
parent64e2155d0620c0fbbaa2827fe2edbf1c6cea135c (diff)
#997: Support for Initrd compressed in several formats.
Adding compatibility with Ubuntu 20.04 Initrd, which is compressed in LZ4 format.
Diffstat (limited to 'server/bin/installmodule')
-rwxr-xr-xserver/bin/installmodule3
1 files changed, 2 insertions, 1 deletions
diff --git a/server/bin/installmodule b/server/bin/installmodule
index 4625bd04..b0a4ac5b 100755
--- a/server/bin/installmodule
+++ b/server/bin/installmodule
@@ -73,7 +73,8 @@ source module.conf || exit
# Descomprimir Initrd.
mkdir -p $tmpinit
cd $tmpinit
-gzip -dc $INITRD | cpio -im 2>/dev/null
+COMPRESS=$(file -b "$CLIENTINITRD" | awk '{print tolower($1);}')
+$COMPRESS -dc $INITRD | cpio -im 2>/dev/null
# Versión del Kernel del Initrd.
KERNEL=$(ls -d lib/modules/[0-9]* | head -1)