File 0008-ifcheck-fix-config-changed-check-bsc-1218926.patch of Package wicked

From 96c62c7585b9bfae034b5b58d31824e66b0eaec1 Mon Sep 17 00:00:00 2001
From: Clemens Famulla-Conrad <cfamullaconrad@suse.de>
Date: Tue, 30 Jan 2024 15:07:39 +0100
Subject: [PATCH 7/8] ifcheck: fix config changed check (bsc#1218926)
References: bsc#1218926
Upstream: submitted

---
 client/ifcheck.c | 23 ++++++++++++-----------
 1 file changed, 12 insertions(+), 11 deletions(-)

diff --git a/client/ifcheck.c b/client/ifcheck.c
index 28c8a3d2..e06c4ba1 100644
--- a/client/ifcheck.c
+++ b/client/ifcheck.c
@@ -305,6 +305,18 @@ ni_do_ifcheck(int argc, char **argv)
 		goto usage;
 	}
 
+	if (!ni_fsm_create_client(fsm)) {
+		/* Severe error we always explicitly return */
+		status = NI_WICKED_RC_ERROR;
+		goto cleanup;
+	}
+
+	if (!ni_fsm_refresh_state(fsm)) {
+		/* Severe error we always explicitly return */
+		status = NI_WICKED_RC_ERROR;
+		goto cleanup;
+	}
+
 	if (opt_ifconfig.count == 0) {
 		const ni_string_array_t *sources = ni_config_sources("ifconfig");
 
@@ -323,17 +335,6 @@ ni_do_ifcheck(int argc, char **argv)
 		goto cleanup;
 	}
 
-	if (!ni_fsm_create_client(fsm)) {
-		/* Severe error we always explicitly return */
-		status = NI_WICKED_RC_ERROR;
-		goto cleanup;
-	}
-
-	if (!ni_fsm_refresh_state(fsm)) {
-		/* Severe error we always explicitly return */
-		status = NI_WICKED_RC_ERROR;
-		goto cleanup;
-	}
 
 	status = NI_WICKED_ST_OK;
 
-- 
2.35.3

openSUSE Build Service is sponsored by