Skip to content

Commit 4cb086f

Browse files
marcosfrmharaldh
authored andcommitted
feat(install): add default value for --firmwaredirs
If not specified, use /lib/firmware.
1 parent a277a5f commit 4cb086f

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/install/dracut-install.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1004,7 +1004,9 @@ static void usage(int status)
10041004
"\n"
10051005
" --module,-m Install kernel modules, instead of files\n"
10061006
" --kerneldir Specify the kernel module directory\n"
1007+
" (default: /lib/modules/`uname -r`)\n"
10071008
" --firmwaredirs Specify the firmware directory search path with : separation\n"
1009+
" (default: DRACUT_FIRMWARE_PATH env var, /lib/firmware if not set)\n"
10081010
" --silent Don't display error messages for kernel module install\n"
10091011
" --modalias Only generate module list from /sys/devices modalias list\n"
10101012
" -o --optional If kernel module does not exist, do not fail\n"
@@ -1183,14 +1185,12 @@ static int parse_argv(int argc, char *argv[])
11831185

11841186
path = getenv("DRACUT_FIRMWARE_PATH");
11851187

1186-
if (path == NULL) {
1187-
log_error("Environment variable DRACUT_FIRMWARE_PATH is not set");
1188-
exit(EXIT_FAILURE);
1188+
if (path) {
1189+
log_debug("DRACUT_FIRMWARE_PATH=%s", path);
1190+
firmwaredirs = strv_split(path, ":");
1191+
} else {
1192+
firmwaredirs = strv_new("/lib/firmware", NULL);
11891193
}
1190-
1191-
log_debug("DRACUT_FIRMWARE_PATH=%s", path);
1192-
1193-
firmwaredirs = strv_split(path, ":");
11941194
}
11951195
}
11961196

0 commit comments

Comments
 (0)