integ/networking/ifupdown-extra/debian/deb_patches/0003-ignore-IFACE-all-for-ifupdown-scripts.patch
Fabiano Mercer 84017b4290 Ignore --all/lo* for ifupdown/nslcd scripts
It was detected the networking.service is marked as failing after reboot.
It happpens because "ifup -a" is executed by the service.
It starts to run the scripts in /etc/network/interfaces.d/.
But several scripts in ifupdown-extra are not prepared to handle "-all".

In the case of nss-pam-ldapd the script /etc/network/if-up.d/nslcd
is failing when there are loopback interfaces with label (lo:X) as the
script only tests the interface "lo".

Test Plan (Debian only - AIO-SX and AIO-DX)):
PASS  Check systemctl status networking.service after unlock

Closes-Bug: #1983503

Change-Id: I1fd9e2ea75233d987d6f1f2aa5a3395ab2885e2b
Signed-off-by: Fabiano Mercer <fabiano.correamercer@windriver.com>
2022-08-12 13:07:02 -03:00

74 lines
2.4 KiB
Diff

From fa4c461a16fc5305dd52558f919b3c7a63257972 Mon Sep 17 00:00:00 2001
From: Fabiano Mercer <fabiano.correamercer@windriver.com>
Date: Fri, 29 Jul 2022 11:07:02 -0300
Subject: [PATCH] ignore IFACE "--all" for ifupdown scripts
---
if-up-scripts/check-duplicate-ip | 3 ++-
if-up-scripts/check-duplicate-ip6 | 3 ++-
if-up-scripts/check-gateway | 3 +++
if-up-scripts/check-network-cable | 3 +++
4 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/if-up-scripts/check-duplicate-ip b/if-up-scripts/check-duplicate-ip
index a07668d..347639d 100755
--- a/if-up-scripts/check-duplicate-ip
+++ b/if-up-scripts/check-duplicate-ip
@@ -105,8 +105,9 @@ fi
# If the interface is a serial (sl), WAN interfaces (ww) or localhost (lo) then skip the test
# as it does not make sense in these
+# this script only handles one interface per run so ignore "--all" as well
case $IFACE in
- sl* | ww* | lo*) exit 0 ;;
+ sl* | ww* | lo* | "--all") exit 0 ;;
*) ;;
esac
diff --git a/if-up-scripts/check-duplicate-ip6 b/if-up-scripts/check-duplicate-ip6
index f48cdd3..b9ff87a 100755
--- a/if-up-scripts/check-duplicate-ip6
+++ b/if-up-scripts/check-duplicate-ip6
@@ -107,8 +107,9 @@ fi
# If the interface is a serial (sl), WAN interfaces (ww) or localhost (lo) then skip the test
# as it does not make sense in these
+# this script only handles one interface per run so ignore "--all" as well
case $IFACE in
- sl* | ww* | lo*) exit 0 ;;
+ sl* | ww* | lo* | "--all") exit 0 ;;
*) ;;
esac
diff --git a/if-up-scripts/check-gateway b/if-up-scripts/check-gateway
index b3fdeb6..97c93b1 100755
--- a/if-up-scripts/check-gateway
+++ b/if-up-scripts/check-gateway
@@ -55,6 +55,9 @@ VERBOSITY=${VERBOSITY:-0}
# Break out if we don't have an interface to work with
[ -z "$IFACE" ] && exit 0
+# Ignore "--all"
+[ "$IFACE" = "--all" ] && exit 0
+
if [ "$DO_SYSLOG" = "yes" ] ; then
OUTPUT="logger -i -p daemon.err -s"
else
diff --git a/if-up-scripts/check-network-cable b/if-up-scripts/check-network-cable
index 94279eb..f8e9044 100755
--- a/if-up-scripts/check-network-cable
+++ b/if-up-scripts/check-network-cable
@@ -180,6 +180,9 @@ case $IFACE in
bond*)
check_bond_status || [ "$ABORT_NO_LINK" != "yes" ] || exit 1
;;
+ "--all")
+ # this script only handles one interface per run
+ ;;
lo*) ;;
*)
check_status || [ "$ABORT_NO_LINK" != "yes" ] || exit 1
--
2.17.1