forked from pool/systemd
Accepting request 241979 from home:rmilasan:branches:Base:System
- Enable better checks in write_net_rules to skip adding duplicated entries in the generate rules (bnc#888178). Add 1053-better-checks-in-write_net_rules.patch - Enable better checks in write_net_rules to skip adding duplicated entries in the generate rules (bnc#888178). Add 1053-better-checks-in-write_net_rules.patch OBS-URL: https://build.opensuse.org/request/show/241979 OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=726
This commit is contained in:
parent
0e9ad01cb8
commit
4345042e2b
29
1053-better-checks-in-write_net_rules.patch
Normal file
29
1053-better-checks-in-write_net_rules.patch
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
Index: systemd-210/src/udev/rule_generator/write_net_rules
|
||||||
|
===================================================================
|
||||||
|
--- systemd-210.orig/src/udev/rule_generator/write_net_rules
|
||||||
|
+++ systemd-210/src/udev/rule_generator/write_net_rules
|
||||||
|
@@ -89,6 +89,12 @@ choose_rules_file
|
||||||
|
|
||||||
|
# the DRIVERS key is needed to not match bridges and VLAN sub-interfaces
|
||||||
|
if [ "$MATCHADDR" ]; then
|
||||||
|
+ # Check if MACADDR doesn't exist already in the generated rules
|
||||||
|
+ MAC="$(/usr/bin/grep -w -o -C1 -m1 "$MATCHADDR" "$RULES_FILE" 2>/dev/null || true)"
|
||||||
|
+ if [ "$MAC" == "$MATCHADDR" ]; then
|
||||||
|
+ unlock_rules_file
|
||||||
|
+ exit 0
|
||||||
|
+ fi
|
||||||
|
match="$match, DRIVERS==\"?*\", ATTR{address}==\"$MATCHADDR\""
|
||||||
|
fi
|
||||||
|
|
||||||
|
@@ -101,8 +107,9 @@ if [ "$MATCHDEVID" ]; then
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MATCHID" ]; then
|
||||||
|
- ID="$(find_all_rules 'KERNELS==' "$MATCHID")"
|
||||||
|
- if [ "$ID" == "$MATCHID" ]; then
|
||||||
|
+ # Check if KERNEL doesn't exist already in the generated rules
|
||||||
|
+ KERNEL="$(find_all_rules 'KERNELS==' "$MATCHID")"
|
||||||
|
+ if [ "$KERNEL" == "$MATCHID" ]; then
|
||||||
|
unlock_rules_file
|
||||||
|
exit 0
|
||||||
|
fi
|
@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Jul 23 09:19:52 UTC 2014 - rmilasan@suse.com
|
||||||
|
|
||||||
|
- Enable better checks in write_net_rules to skip adding duplicated
|
||||||
|
entries in the generate rules (bnc#888178).
|
||||||
|
Add 1053-better-checks-in-write_net_rules.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Jul 23 09:13:43 UTC 2014 - werner@suse.de
|
Wed Jul 23 09:13:43 UTC 2014 - werner@suse.de
|
||||||
|
|
||||||
|
@ -835,6 +835,8 @@ Patch1050: 1050-only-rename-SRIOV-VF-devices-when-name-starts-with-eth.patc
|
|||||||
Patch1051: 1051-check-if-NAME-has-a-value.patch
|
Patch1051: 1051-check-if-NAME-has-a-value.patch
|
||||||
# PATCH-FIX-UPSTREAM 1052-rules-uaccess-add-ID_SOFTWARE_RADIO.patch
|
# PATCH-FIX-UPSTREAM 1052-rules-uaccess-add-ID_SOFTWARE_RADIO.patch
|
||||||
Patch1052: 1052-rules-uaccess-add-ID_SOFTWARE_RADIO.patch
|
Patch1052: 1052-rules-uaccess-add-ID_SOFTWARE_RADIO.patch
|
||||||
|
# PATCH-FIX-SUSE 1053-better-checks-in-write_net_rules.patch (bnc#888178)
|
||||||
|
Patch1053: 1053-better-checks-in-write_net_rules.patch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Systemd is a system and service manager, compatible with SysV and LSB
|
Systemd is a system and service manager, compatible with SysV and LSB
|
||||||
@ -1407,6 +1409,7 @@ cp %{SOURCE7} m4/
|
|||||||
%patch1050 -p1
|
%patch1050 -p1
|
||||||
%patch1051 -p1
|
%patch1051 -p1
|
||||||
%patch1052 -p0
|
%patch1052 -p0
|
||||||
|
%patch1053 -p1
|
||||||
|
|
||||||
# ensure generate files are removed
|
# ensure generate files are removed
|
||||||
rm -f units/emergency.service
|
rm -f units/emergency.service
|
||||||
|
@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Jul 23 09:19:52 UTC 2014 - rmilasan@suse.com
|
||||||
|
|
||||||
|
- Enable better checks in write_net_rules to skip adding duplicated
|
||||||
|
entries in the generate rules (bnc#888178).
|
||||||
|
Add 1053-better-checks-in-write_net_rules.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Jul 23 09:13:43 UTC 2014 - werner@suse.de
|
Wed Jul 23 09:13:43 UTC 2014 - werner@suse.de
|
||||||
|
|
||||||
|
@ -830,6 +830,8 @@ Patch1050: 1050-only-rename-SRIOV-VF-devices-when-name-starts-with-eth.patc
|
|||||||
Patch1051: 1051-check-if-NAME-has-a-value.patch
|
Patch1051: 1051-check-if-NAME-has-a-value.patch
|
||||||
# PATCH-FIX-UPSTREAM 1052-rules-uaccess-add-ID_SOFTWARE_RADIO.patch
|
# PATCH-FIX-UPSTREAM 1052-rules-uaccess-add-ID_SOFTWARE_RADIO.patch
|
||||||
Patch1052: 1052-rules-uaccess-add-ID_SOFTWARE_RADIO.patch
|
Patch1052: 1052-rules-uaccess-add-ID_SOFTWARE_RADIO.patch
|
||||||
|
# PATCH-FIX-SUSE 1053-better-checks-in-write_net_rules.patch (bnc#888178)
|
||||||
|
Patch1053: 1053-better-checks-in-write_net_rules.patch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Systemd is a system and service manager, compatible with SysV and LSB
|
Systemd is a system and service manager, compatible with SysV and LSB
|
||||||
@ -1402,6 +1404,7 @@ cp %{SOURCE7} m4/
|
|||||||
%patch1050 -p1
|
%patch1050 -p1
|
||||||
%patch1051 -p1
|
%patch1051 -p1
|
||||||
%patch1052 -p0
|
%patch1052 -p0
|
||||||
|
%patch1053 -p1
|
||||||
|
|
||||||
# ensure generate files are removed
|
# ensure generate files are removed
|
||||||
rm -f units/emergency.service
|
rm -f units/emergency.service
|
||||||
|
Loading…
Reference in New Issue
Block a user