[Debian-eeepc-devel] [Debian-eeepc-commits] [SCM] Maintenance of eeepc-acpi-scripts debian package branch, master, updated. 1.1.0-beta.1-16-g64b40be

Damyan Ivanov dmn at debian.org
Sat May 30 07:32:35 UTC 2009


-=| Raphael Geissert, Fri, May 29, 2009 at 06:14:12PM +0000 |=-
> The following commit has been merged in the master branch:
> commit 64b40be8fe2a36553a59f160955116ca17bfad38
> Author: Raphael Geissert <atomo64 at gmail.com>
> Date:   Fri May 29 13:14:51 2009 -0500
> 
>     Avoid code duplication for no reason
> 
> diff --git a/etc/acpi/actions/hotkey.sh b/etc/acpi/actions/hotkey.sh
> index 1db545c..6fc3f59 100755
> --- a/etc/acpi/actions/hotkey.sh
> +++ b/etc/acpi/actions/hotkey.sh
> @@ -135,7 +135,7 @@ case $code in
>  
>      # --/F7 - backlight off
>      00000016)
> -	if [ "${FnF_BACKLIGHTOFF:-handle_blank_screen}" != 'NONE' ]; then
> +	if [ "${FnF_BACKLIGHTOFF}" != 'NONE' ]; then
>  	    ${FnF_BACKLIGHTOFF:-handle_blank_screen}
>  	fi
>  	;;
> ...

This is not code duplication, but protection agains undefined variable 
reference. The scripts run with "set -u".

Perhaps a simple ${FnF_BACKLIGHTOFF:-} could be used since the default 
is not important in the condition.

-- 
dam
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/debian-eeepc-devel/attachments/20090530/441bed32/attachment.pgp>


More information about the Debian-eeepc-devel mailing list