@@ -465,10 +465,6 @@ rpmostree_run_dracut (int rootfs_dfd, const char *const *argv, const char *kver,
465
465
{
466
466
auto destdir = rpmostreecxx ::cliwrap_destdir ();
467
467
468
- /* We pass through DRACUT_NO_XATTR. */
469
- const char * noxattr = g_getenv ("DRACUT_NO_XATTR" ) ?: "" ;
470
- const char * noxattr_key = noxattr ? "DRACUT_NO_XATTR=" : "" ;
471
-
472
468
/* Shell wrapper around dracut to write to the O_TMPFILE fd;
473
469
* at some point in the future we should add --fd X instead of -f
474
470
* to dracut.
@@ -478,13 +474,13 @@ rpmostree_run_dracut (int rootfs_dfd, const char *const *argv, const char *kver,
478
474
g_autofree char * rpmostree_dracut_wrapper
479
475
= g_strdup_printf ("#!/usr/bin/bash\n"
480
476
"set -euo pipefail\n"
481
- "export PATH=%s:${PATH} %s%s \n"
477
+ "export PATH=%s:${PATH}\n"
482
478
"extra_argv=; if (dracut --help; true) | grep -q -e --reproducible; then "
483
479
"extra_argv=\"--reproducible\"; fi\n"
484
480
"mkdir -p /tmp/dracut && dracut $extra_argv -v --add ostree "
485
481
"--tmpdir=/tmp/dracut -f /tmp/initramfs.img \"$@\"\n"
486
482
"cat /tmp/initramfs.img >/proc/self/fd/3\n" ,
487
- destdir .c_str (), noxattr_key , noxattr );
483
+ destdir .c_str ());
488
484
g_autoptr (GPtrArray ) rebuild_argv = NULL ;
489
485
g_auto (GLnxTmpfile ) tmpf = {
490
486
0 ,
@@ -554,6 +550,10 @@ rpmostree_run_dracut (int rootfs_dfd, const char *const *argv, const char *kver,
554
550
* try to create the other ones (/dev/null, /dev/kmsg, and /dev/console) since it'll fail anyway
555
551
* (and print ugly messages) since we don't give it `CAP_MKNOD`. */
556
552
bwrap -> setenv ("DRACUT_NO_MKNOD" , "1" );
553
+ /* We pass through DRACUT_NO_XATTR. */
554
+ const char * noxattr = g_getenv ("DRACUT_NO_XATTR" );
555
+ if (noxattr )
556
+ bwrap -> setenv ("DRACUT_NO_XATTR" , noxattr );
557
557
558
558
if (dracut_host_tmpdir )
559
559
bwrap -> bind_readwrite (dracut_host_tmpdir -> path , "/tmp/dracut" );
0 commit comments