fix(post-install): export GZIP in pigz wrapper so level -1 takes effect

The wrapper assigned GZIP="-1" without exporting it, so pigz never saw
it and compressed at its default level 6. Export it, and refresh
/bin/gzip on re-runs when gzip.original already exists so existing
installs pick up the corrected wrapper.
This commit is contained in:
pbr
2026-09-30 21:57:38 +02:00
parent 22e8bf2532
commit e9957415ed
@@ -1666,14 +1666,14 @@ configure_pigz() {
if [ ! -f /bin/pigzwrapper ] || ! cmp -s /bin/pigzwrapper - <<EOF
#!/bin/sh
PATH=/bin:\$PATH
GZIP="-1"
export GZIP="-1"
exec /usr/bin/pigz "\$@"
EOF
then
pmx_write_file /bin/pigzwrapper <<EOF
#!/bin/sh
PATH=/bin:\$PATH
GZIP="-1"
export GZIP="-1"
exec /usr/bin/pigz "\$@"
EOF
chmod +x /bin/pigzwrapper
@@ -1689,6 +1689,10 @@ EOF
pmx_write_file /bin/gzip < /bin/pigzwrapper && \
chmod +x /bin/gzip
msg_ok "$(translate "gzip replaced with pigz wrapper successfully")"
elif ! cmp -s /bin/gzip /bin/pigzwrapper; then
pmx_write_file /bin/gzip < /bin/pigzwrapper && \
chmod +x /bin/gzip
msg_ok "$(translate "gzip replaced with pigz wrapper successfully")"
else
msg_ok "$(translate "gzip replaced with pigz wrapper successfully")"
fi