[PATCH] Bashism in tools/linux/hal-system-lcd-get-brightness-linux

Martin Pitt martin.pitt at ubuntu.com
Wed Jan 10 03:29:45 PST 2007


Hi,

In [1] we got a report that LCD brightness setting does not work on
Sony Vaio laptops. This is due to the 'let = ...' syntax which is a
bashism, but the script has a /bin/sh hashbang.

I replaced the let by its POSIX counterpart.

Thanks,

Martin

[1] https://launchpad.net/ubuntu/+source/hal/+bug/68617

--- hal-0.5.8.1/tools/linux/hal-system-lcd-get-brightness-linux	2006-09-19 22:23:25.000000000 +0200
+++ hal-0.5.8.1/tools/linux/hal-system-lcd-get-brightness-linux	2007-01-10 12:25:54.000000000 +0100
@@ -46,7 +46,7 @@
 	# cat /proc/acpi/sony/brightness
 	#  5
 	value="`cat $HAL_PROP_LINUX_ACPI_PATH`"
-	let "value = ${value} - 1"
+	value=$(($value-1))
 elif [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" = "omnibook" ]; then
 	# cat /proc/omnibook/lcd
 	#  LCD brightness:  7


-- 
Martin Pitt        http://www.piware.de
Ubuntu Developer   http://www.ubuntu.com
Debian Developer   http://www.debian.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.freedesktop.org/archives/hal/attachments/20070110/29a9459d/attachment.pgp


More information about the hal mailing list