blob: 2ce0fb6b317074967a4ea852acfb8691552b0f78 [file] [log] [blame]
--- extras/rule_generator/rule_generator.functions.orig 2008-10-23 06:33:41.000000000 -0700
+++ extras/rule_generator/rule_generator.functions 2010-05-26 10:26:20.000000000 -0700
@@ -57,7 +57,9 @@
# 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() {
- local tmp_rules_file="/dev/.udev/tmp-rules--${RULES_FILE##*/}"
+ local orig_rules_base=${RULES_FILE##*/}
+ local tmp_rules_base=${orig_rules_base%%.rules}--tmp.rules
+ local tmp_rules_file="/dev/.udev/rules.d/$tmp_rules_base"
[ -e "$RULES_FILE" -o -e "$tmp_rules_file" ] || PRINT_HEADER=1
if writeable ${RULES_FILE%/*}; then