From 42e8bb6f1239faa9e43598df17b30a7fdbefa732 Mon Sep 17 00:00:00 2001 From: andrew-aladev Date: Sun, 30 Jun 2013 13:25:16 +0300 Subject: rule_generator/rule_generator.functions: fix net rule generator `udevadm info --run` no longer returns the correct run directory so we hard code it as "/run/udev/" X-Gentoo-Bug: 475276 X-Gentoo-Bug-URL: https://bugs.gentoo.org/475276 Signed-off-by: Anthony G. Basile --- rule_generator/rule_generator.functions | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rule_generator/rule_generator.functions b/rule_generator/rule_generator.functions index 4bec27a1b7..a6e9c8c4d8 100644 --- a/rule_generator/rule_generator.functions +++ b/rule_generator/rule_generator.functions @@ -48,8 +48,7 @@ writeable() { # Create a lock file for the current rules file. lock_rules_file() { - RUNDIR=$(udevadm info --run) - [ -e "$RUNDIR" ] || return 0 + RUNDIR="/run/udev/" RULES_LOCK="$RUNDIR/.lock-${RULES_FILE##*/}" @@ -72,7 +71,8 @@ unlock_rules_file() { # Choose the real rules file if it is writeable or a temporary file if not. # Both files should be checked later when looking for existing rules. choose_rules_file() { - RUNDIR=$(udevadm info --run) + RUNDIR="/run/udev/" + local tmp_rules_file="$RUNDIR/tmp-rules--${RULES_FILE##*/}" [ -e "$RULES_FILE" -o -e "$tmp_rules_file" ] || PRINT_HEADER=1 -- cgit v1.2.3-54-g00ecf