[arch-commits] Commit in systemd/trunk (initcpio-install-systemd)

Dave Reisner dreisner at nymeria.archlinux.org
Tue Jul 23 15:20:36 UTC 2013


    Date: Tuesday, July 23, 2013 @ 17:20:36
  Author: dreisner
Revision: 191322

cut processing time in half for udev rules

Modified:
  systemd/trunk/initcpio-install-systemd

--------------------------+
 initcpio-install-systemd |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Modified: initcpio-install-systemd
===================================================================
--- initcpio-install-systemd	2013-07-23 15:15:03 UTC (rev 191321)
+++ initcpio-install-systemd	2013-07-23 15:20:36 UTC (rev 191322)
@@ -24,11 +24,14 @@
     add_file "$rules"
 
     while IFS=, read -ra rule; do
+        # skip empty lines, comments
+        [[ -z $rule || $rule = @(+([[:space:]])|#*) ]] && continue
+
         for pair in "${rule[@]}"; do
             IFS=' =' read -r key value <<< "$pair"
-            strip_quotes 'value'
             case $key in
                 RUN@({program}|+)|IMPORT{program}|ENV{REMOVE_CMD})
+                    strip_quotes 'value'
                     # just take the first word as the binary name
                     binary=${value%% *}
                     if [[ ${binary:0:1} != '/' ]]; then




More information about the arch-commits mailing list