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