Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP2:GA
systemd-mini.414
1053-better-checks-in-write_net_rules.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 1053-better-checks-in-write_net_rules.patch of Package systemd-mini.414
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
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor