Skip to content

Commit

Permalink
mkdumprd: Use the correct syntax to redirect the stderr to null
Browse files Browse the repository at this point in the history
A space was added by mistake and unfortunately fips-mode-setup refuses
an extra parameter,

    # fips-mode-setup --is-enabled 2 > /dev/null
    # echo $?
    2
    # fips-mode-setup --is-enabled 2
    Check, enable, or disable the system FIPS mode.
    usage: /usr/bin/fips-mode-setup --enable|--disable [--no-bootcfg]
    usage: /usr/bin/fips-mode-setup --check
    usage: /usr/bin/fips-mode-setup --is-enabled

So in this case mkdumprd can never detect if FIPS is enabled. Fix this
mistake.

Fixes: 443a43e ("mkdumprd: call dracut with --add-device to install the drivers needed by /boot partition automatically for FIPS")
Signed-off-by: Coiby Xu <coxu@redhat.com>
Reviewed-by: Tao Liu <ltao@redhat.com>
  • Loading branch information
coiby committed Jun 1, 2023
1 parent 4311534 commit e42a823
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mkdumprd
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ if ! is_fadump_capable; then

add_dracut_arg "--no-hostonly-default-device"

if fips-mode-setup --is-enabled 2 > /dev/null; then
if fips-mode-setup --is-enabled 2> /dev/null; then
add_dracut_arg --add-device "$(findmnt -n -o SOURCE --target /boot)"
fi
fi
Expand Down

0 comments on commit e42a823

Please sign in to comment.