]> TLD Linux GIT Repositories - packages/rc-scripts.git/commitdiff
- fix network scripts regex for newer iproute2, fixes removal of local ip rules
authorMarcin Krol <hawk@tld-linux.org>
Mon, 9 Sep 2019 22:48:17 +0000 (22:48 +0000)
committerMarcin Krol <hawk@tld-linux.org>
Mon, 9 Sep 2019 22:48:17 +0000 (22:48 +0000)
misc_fixes.patch
rc-scripts.spec

index 21c5c1af8fa46abe30b5c43e7351848dc0dae57e..8debdaf83d1c0dc760f0ed8ade9ae639d0664a37 100644 (file)
@@ -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
index 932e60f58467ac00ef19e3c185b325458981d3b8..168cb5a1dae7b6e9f51aca3b31072ef3916952b9 100644 (file)
@@ -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