Skip to content

Commit d8e47e2

Browse files
rmetrichharaldh
authored andcommitted
fix(dracut.sh): harden dracut against GZIP environment variable
When a GZIP environment variable is set, this leads to various breakage: In case 'pigz' is installed and GZIP is defined as a path, e.g. /usr/local/bin/gzip, then dracut will fail with the following message: " pigz: abort: cannot provide files in GZIP environment variable " In case 'pigz' isn't installed and regular 'gzip' is used and GZIP is defined as a path, e.g. /usr/local/bin/gzip, then the path will be zipped and dracut will fail for no obvious reason. Trying again, dracut will then fail with following message: " gzip: /usr/local/bin/gzip.gz already exists; not overwritten " In any case, GZIP environment should be unset to avoid breakage or unwanted behaviour. This variable is anyway obsolescent, from gzip(1) manpage. Signed-off-by: Renaud Métrich <rmetrich@redhat.com>
1 parent 6303349 commit d8e47e2

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

dracut.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
# store for logging
2525

2626
unset BASH_ENV
27+
unset GZIP
2728

2829
# Verify bash version, current minimum is 4
2930
if (( BASH_VERSINFO[0] < 4 )); then

0 commit comments

Comments
 (0)