mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2026-10-19 12:02:00 +00:00
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:
@@ -1666,14 +1666,14 @@ configure_pigz() {
|
|||||||
if [ ! -f /bin/pigzwrapper ] || ! cmp -s /bin/pigzwrapper - <<EOF
|
if [ ! -f /bin/pigzwrapper ] || ! cmp -s /bin/pigzwrapper - <<EOF
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
PATH=/bin:\$PATH
|
PATH=/bin:\$PATH
|
||||||
GZIP="-1"
|
export GZIP="-1"
|
||||||
exec /usr/bin/pigz "\$@"
|
exec /usr/bin/pigz "\$@"
|
||||||
EOF
|
EOF
|
||||||
then
|
then
|
||||||
pmx_write_file /bin/pigzwrapper <<EOF
|
pmx_write_file /bin/pigzwrapper <<EOF
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
PATH=/bin:\$PATH
|
PATH=/bin:\$PATH
|
||||||
GZIP="-1"
|
export GZIP="-1"
|
||||||
exec /usr/bin/pigz "\$@"
|
exec /usr/bin/pigz "\$@"
|
||||||
EOF
|
EOF
|
||||||
chmod +x /bin/pigzwrapper
|
chmod +x /bin/pigzwrapper
|
||||||
@@ -1689,6 +1689,10 @@ EOF
|
|||||||
pmx_write_file /bin/gzip < /bin/pigzwrapper && \
|
pmx_write_file /bin/gzip < /bin/pigzwrapper && \
|
||||||
chmod +x /bin/gzip
|
chmod +x /bin/gzip
|
||||||
msg_ok "$(translate "gzip replaced with pigz wrapper successfully")"
|
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
|
else
|
||||||
msg_ok "$(translate "gzip replaced with pigz wrapper successfully")"
|
msg_ok "$(translate "gzip replaced with pigz wrapper successfully")"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user