From 4cb086fa2995799b95c0b25bc9a0cf72ba3868ea Mon Sep 17 00:00:00 2001 From: Marcos Mello Date: Sun, 23 May 2021 21:04:20 -0300 Subject: [PATCH] feat(install): add default value for --firmwaredirs If not specified, use /lib/firmware. --- src/install/dracut-install.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/install/dracut-install.c b/src/install/dracut-install.c index 3fd70fc88..018fdbd76 100644 --- a/src/install/dracut-install.c +++ b/src/install/dracut-install.c @@ -1004,7 +1004,9 @@ static void usage(int status) "\n" " --module,-m Install kernel modules, instead of files\n" " --kerneldir Specify the kernel module directory\n" + " (default: /lib/modules/`uname -r`)\n" " --firmwaredirs Specify the firmware directory search path with : separation\n" + " (default: DRACUT_FIRMWARE_PATH env var, /lib/firmware if not set)\n" " --silent Don't display error messages for kernel module install\n" " --modalias Only generate module list from /sys/devices modalias list\n" " -o --optional If kernel module does not exist, do not fail\n" @@ -1183,14 +1185,12 @@ static int parse_argv(int argc, char *argv[]) path = getenv("DRACUT_FIRMWARE_PATH"); - if (path == NULL) { - log_error("Environment variable DRACUT_FIRMWARE_PATH is not set"); - exit(EXIT_FAILURE); + if (path) { + log_debug("DRACUT_FIRMWARE_PATH=%s", path); + firmwaredirs = strv_split(path, ":"); + } else { + firmwaredirs = strv_new("/lib/firmware", NULL); } - - log_debug("DRACUT_FIRMWARE_PATH=%s", path); - - firmwaredirs = strv_split(path, ":"); } } -- 2.47.3