# HG changeset patch # User Pascal Bellard # Date 1325262702 -3600 # Node ID 6a208ab5c5c50034e1f4493819527d14d60c1d70 # Parent c9d901c361288387e2de8787c70609ef2cc178e8 hardware.cgi: add LCD brightness support diff -r c9d901c36128 -r 6a208ab5c5c5 hardware.cgi --- a/hardware.cgi Wed Dec 07 15:14:37 2011 +0100 +++ b/hardware.cgi Fri Dec 30 17:31:42 2011 +0100 @@ -92,6 +92,9 @@ done table_end ;; *) + [ -n "$(GET brightness)" ] && + echo -n $(GET brightness) > /proc/acpi/video/$(GET dev)/LCD/brightness + # # Default to summary with mounted filesystem, loaded modules # @@ -100,6 +103,41 @@

`gettext "Drivers & Devices"`

`gettext "Manage your computer hardware`

+EOT + if [ -n "$(ls /proc/acpi/video/*/LCD/brightness 2> /dev/null)" ]; then + cat < +EOT + for dev in /proc/acpi/video/*/LCD/brightness ; do + name=$(echo $dev | sed 's|.*/video/||;s|/LCD/.*||') + cat < +$(gettext "LCD brightness") $name: