3
0
Fork 0
forked from mirrors/nixpkgs

udev: Ignore commented lines when populating run_progs.

Patch by mornfall

svn path=/nixos/trunk/; revision=30763
This commit is contained in:
Shea Levy 2011-12-05 16:53:58 +00:00
parent 868c60c92b
commit 72d7401976

View file

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