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>
This commit is contained in:
andrew-aladev 2013-06-30 13:25:16 +03:00 committed by Anthony G. Basile
parent b722b49e9e
commit 42e8bb6f12

View File

@ -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