]> git.ipfire.org Git - thirdparty/dracut.git/commit
fix(dracut.sh): harden dracut against GZIP environment variable
authorRenaud Métrich <rmetrich@redhat.com>
Mon, 1 Mar 2021 16:43:10 +0000 (17:43 +0100)
committerHarald Hoyer <harald@hoyer.xyz>
Tue, 2 Mar 2021 10:05:52 +0000 (11:05 +0100)
commitd8e47e201af4646e2a82e11220ea9c993bd2ed48
tree0fcaab6e8ec037556e600697da750532f5db046d
parent630334950c9a7a714fdf31b6ff545d804b5df2f2
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>
dracut.sh