2013/8/11 Ritesh Raj Sarraf <r...@researchut.com>:
> This is already fixes in my upstream branch. It will be part of the next
> release.
>
> BTW, won't just *.conf solve the problem.

Yes, I realised just after sending the mail I quoted the wrong patch. I
sent the correct patch in a follow up email:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=673818#24

> The current fix in my branch is:
>
[..]
>      for PER_DIR in $CONF_DIR; do
> -           for CONF in $PER_DIR/*; do
> +           for CONF in $PER_DIR/*.conf; do
>                     if [ -r "$CONF" ] ; then


The fix in the repo still has the original problem, because if the
/etc/laptop-mode/conf.d or /etc/laptop-mode/conf.d/board-specific
directories exists, but contains no .conf files, the script will generate
the ugly warning initially reported since the shell does not expand the
wildcard.


OTOH, the form below (and in the second patch) will not generate it because
the expansion of the ls command is an empty string, so $CONF is never set
to an invalid file:

for CONF in $(ls $PER_DIR/*.conf 2>/dev/null); do



Patch is here:
http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=24;filename=673818.patch;att=1;bug=673818


-- 
Regards,
EddyP
=============================================
The universe is not required to be in perfect harmony with human ambition.
- Carl Sagan

Reply via email to