fix bashisms in write_net_rules script

OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=819
This commit is contained in:
Dr. Werner Fink 2014-11-19 09:32:26 +00:00 committed by Git OBS Bridge
parent d1fe49acdf
commit 305e34eb33
2 changed files with 9 additions and 2 deletions

View File

@ -8,7 +8,7 @@ Index: systemd-210/src/udev/rule_generator/write_net_rules
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
+ if [ "$MAC" = "$MATCHADDR" ]; then
+ unlock_rules_file
+ exit 0
+ fi
@ -23,7 +23,7 @@ Index: systemd-210/src/udev/rule_generator/write_net_rules
- 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
+ if [ "$KERNEL" = "$MATCHID" ]; then
unlock_rules_file
exit 0
fi

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Wed Nov 19 00:58:00 UTC 2014 - Led <ledest@gmail.com>
- fix bashisms in write_net_rules script
- update patches:
* 1053-better-checks-in-write_net_rules.patch
-------------------------------------------------------------------
Tue Nov 18 10:26:08 UTC 2014 - werner@suse.de