28ab1c
From 68826ecc8d1b0605cd69a4f679c0cd4de4e12b18 Mon Sep 17 00:00:00 2001
28ab1c
From: David Tardon <dtardon@redhat.com>
28ab1c
Date: Tue, 9 Feb 2021 16:46:07 +0100
28ab1c
Subject: [PATCH] 35network-legacy: discard pointless RTNETLINK message
28ab1c
28ab1c
This command prints
28ab1c
28ab1c
    RTNETLINK answers: Network is unreachable
28ab1c
28ab1c
to stderr if IP is not assigned yet, but that's the thing we are
28ab1c
checking for, so there's no point in showing the message.
28ab1c
28ab1c
(cherry picked from commit c46ed697a20798c09ead362443691d810e122996)
28ab1c
28ab1c
Resolves: #1879597
28ab1c
---
28ab1c
 modules.d/35network-legacy/ifup.sh | 2 +-
28ab1c
 1 file changed, 1 insertion(+), 1 deletion(-)
28ab1c
28ab1c
diff --git a/modules.d/35network-legacy/ifup.sh b/modules.d/35network-legacy/ifup.sh
28ab1c
index 61838741..bd560379 100755
28ab1c
--- a/modules.d/35network-legacy/ifup.sh
28ab1c
+++ b/modules.d/35network-legacy/ifup.sh
28ab1c
@@ -106,7 +106,7 @@ do_static() {
28ab1c
         return 1
28ab1c
     fi
28ab1c
 
28ab1c
-    ip route get "$ip" | {
28ab1c
+    ip route get "$ip" 2>/dev/null | {
28ab1c
         read a rest
28ab1c
         if [ "$a" = "local" ]; then
28ab1c
             warn "Not assigning $ip to interface $netif, cause it is already assigned!"
28ab1c