From 72d740197653ac1d21846d6a4f03dd22237fb968 Mon Sep 17 00:00:00 2001 From: Shea Levy Date: Mon, 5 Dec 2011 16:53:58 +0000 Subject: [PATCH] udev: Ignore commented lines when populating run_progs. Patch by mornfall svn path=/nixos/trunk/; revision=30763 --- modules/services/hardware/udev.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/services/hardware/udev.nix b/modules/services/hardware/udev.nix index 143f8ebbad82..55f830c5365c 100644 --- a/modules/services/hardware/udev.nix +++ b/modules/services/hardware/udev.nix @@ -68,7 +68,7 @@ let echo -n "Checking that all programs called by relative paths in udev rules exist in ${udev}/lib/udev ... " import_progs=$(grep 'IMPORT{program}="[^/$]' $out/* | sed -e 's/.*IMPORT{program}="\([^ "]*\)[ "].*/\1/' | uniq) - run_progs=$(grep 'RUN+="[^/$]' $out/* | + run_progs=$(grep -v '^[[:space:]]*#' $out/* | grep 'RUN+="[^/$]' | sed -e 's/.*RUN+="\([^ "]*\)[ "].*/\1/' | uniq) for i in $import_progs $run_progs; do if [[ ! -x ${pkgs.udev}/lib/udev/$i && ! $i =~ socket:.* ]]; then @@ -82,7 +82,7 @@ let echo -n "Checking that all programs call by absolute paths in udev rules exist ... " import_progs=$(grep 'IMPORT{program}="/' $out/* | sed -e 's/.*IMPORT{program}="\([^ "]*\)[ "].*/\1/' | uniq) - run_progs=$(grep 'RUN+="/' $out/* | + run_progs=$(grep -v '^[[:space:]]*#' $out/* | grep 'RUN+="/' | sed -e 's/.*RUN+="\([^ "]*\)[ "].*/\1/' | uniq) for i in $import_progs $run_progs; do if [[ ! -x $i ]]; then