]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
feat(install): add default value for --firmwaredirs
authorMarcos Mello <marcosfrm@gmail.com>
Mon, 24 May 2021 00:04:20 +0000 (21:04 -0300)
committerHarald Hoyer <harald@hoyer.xyz>
Tue, 25 May 2021 09:48:59 +0000 (11:48 +0200)
If not specified, use /lib/firmware.

src/install/dracut-install.c

index 3fd70fc88b6d1b8ea39139b9d22267da8a02fe14..018fdbd7691e7605a9e64d1806a4ba7ad6ac12c0 100644 (file)
@@ -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, ":");
                 }
         }