@@ -957,11 +957,6 @@ main (int argc, char *argv[])
exit(RTVL_FAIL);
}
- if (check_alias_settings(conf)) {
- fprintf(stderr, "fatal configuration error, aborting");
- exit(RTVL_FAIL);
- }
-
if (optind < argc) {
dev = calloc(1, FILE_NAME_SIZE);
@@ -988,20 +983,9 @@ main (int argc, char *argv[])
libmp_udev_set_sync_support(1);
- if (init_checkers()) {
- condlog(0, "failed to initialize checkers");
- goto out;
- }
- if (init_prio()) {
- condlog(0, "failed to initialize prioritizers");
- goto out;
- }
-
if ((cmd == CMD_LIST_SHORT || cmd == CMD_LIST_LONG) && enable_foreign)
conf->enable_foreign = strdup("");
- /* Failing here is non-fatal */
- init_foreign(conf->enable_foreign);
if (cmd == CMD_USABLE_PATHS) {
r = check_usable_paths(conf, dev, dev_type) ?
RTVL_FAIL : RTVL_OK;
@@ -1036,6 +1020,23 @@ main (int argc, char *argv[])
break;
}
+ if (check_alias_settings(conf)) {
+ fprintf(stderr, "fatal configuration error, aborting");
+ exit(RTVL_FAIL);
+ }
+
+ if (init_checkers()) {
+ condlog(0, "failed to initialize checkers");
+ goto out;
+ }
+ if (init_prio()) {
+ condlog(0, "failed to initialize prioritizers");
+ goto out;
+ }
+
+ /* Failing here is non-fatal */
+ init_foreign(conf->enable_foreign);
+
if (cmd == CMD_RESET_WWIDS) {
struct multipath * mpp;
int i;