summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandrew-aladev <aladjev.andrew@gmail.com>2013-06-30 13:25:16 +0300
committerAnthony G. Basile <blueness@gentoo.org>2013-07-01 12:57:38 -0400
commit42e8bb6f1239faa9e43598df17b30a7fdbefa732 (patch)
treeac18aa0e775cd55d6f2e15aaeae5319c05463e6c
parentb722b49e9e857edbcc88cda0a94ddef87458e896 (diff)
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 <blueness@gentoo.org>
-rw-r--r--rule_generator/rule_generator.functions6
1 files 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