--fstab) use_fstab_l="yes" ;;
-h|--help) usage; exit 1 ;;
-i|--include) include_src="$2"; include_target="$3"; shift 2;;
- --gzip) [[ $compress != cat ]] && compress="gzip -9";;
--bzip2) [[ $compress != cat ]] && compress="bzip2 -9";;
--xz) [[ $compress != cat ]] && compress="xz -9";;
--no-compress) compress="cat";;
+ --gzip) if [[ $compress != cat ]]; then
+ type pigz > /dev/null 2>&1 && compress="pigz -9" || \
+ compress="gzip -9"
+ fi;;
--ignore-kernel-modules) kernel_only="no"; no_kernel="yes"
ignore_kmodules="yes"
omit_dracutmodules_l+=\ kernel-modules
hookdirs="cmdline pre-udev pre-trigger netroot pre-mount pre-pivot mount emergency"
-[[ -n "$TMPDIR" ]] && ! [[ -w "$TMPDIR" ]] && unset TMPDIR
+[[ $TMPDIR && ! -w $TMPDIR ]] && unset TMPDIR
readonly initdir=$(mktemp -d -t initramfs.XXXXXX)
trap 'ret=$?;rm -rf "$initdir";exit $ret;' EXIT # clean up after ourselves no matter how we die.
hardlink "$initdir" 2>&1
}
-[[ $compress = gzip* ]] && type pigz > /dev/null 2>&1 && compress="pigz -9"
if ! ( cd "$initdir"; find . |cpio -R 0:0 -H newc -o --quiet | \
$compress > "$outfile"; ); then
derror "dracut: creation of $outfile failed"