From b900baf13421f952a7a9a8f1f12d0446a544bb95 Mon Sep 17 00:00:00 2001 From: Marcin Krol Date: Mon, 9 Sep 2019 22:48:17 +0000 Subject: [PATCH] - fix network scripts regex for newer iproute2, fixes removal of local ip rules --- misc_fixes.patch | 22 ++++++++++++++++++++++ rc-scripts.spec | 2 +- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/misc_fixes.patch b/misc_fixes.patch index 21c5c1a..8debdaf 100644 --- a/misc_fixes.patch +++ b/misc_fixes.patch @@ -51,3 +51,25 @@ index a196f21..a4f125d 100644 RUN_SULOGIN_ON_ERR=yes # Default run nice level for all services if $SERVICE_RUN_NICE_LEVEL is not +diff --git a/lib/functions.network b/lib/functions.network +index d151b04..862d42b 100644 +--- a/lib/functions.network ++++ b/lib/functions.network +@@ -484,7 +484,7 @@ setup_ip_rules () + /sbin/ip rule add $args $prio + done + elif is_no "$1"; then +- LC_ALL=C /sbin/ip rule show | grep -vE -e "from all lookup (main|default|local|253|254|255) \$" -e " map-to " | while read prio from src args; do ++ LC_ALL=C /sbin/ip rule show | grep -vE -e "from all lookup (main|default|local|253|254|255)[[:space:]]*\$" -e " map-to " | while read prio from src args; do + [ "$src" = "all" ] && /sbin/ip rule delete $args || /sbin/ip rule delete $from $src $args + done + fi +@@ -503,7 +503,7 @@ setup_ip_rules () + /sbin/ip -6 rule add $args $prio + done + elif is_no "$1"; then +- LC_ALL=C /sbin/ip -6 rule show | grep -vE -e "from all lookup (main|default|local|253|254|255) \$" -e " map-to " | while read prio from src args; do ++ LC_ALL=C /sbin/ip -6 rule show | grep -vE -e "from all lookup (main|default|local|253|254|255)[[:space:]]*\$" -e " map-to " | while read prio from src args; do + [ "$src" = "all" ] && /sbin/ip -6 rule delete $args || /sbin/ip -6 rule delete $from $src $args + done + fi diff --git a/rc-scripts.spec b/rc-scripts.spec index 932e60f..168cb5a 100644 --- a/rc-scripts.spec +++ b/rc-scripts.spec @@ -8,7 +8,7 @@ Summary(pl.UTF-8): inittab i skrypty startowe z katalogu /etc/rc.d Summary(tr.UTF-8): inittab ve /etc/rc.d dosyaları Name: rc-scripts Version: 0.5.1 -Release: 3 +Release: 4 License: GPL v2 Group: Base Source0: %{name}-%{version}.tar.gz -- 2.46.0