This file is indexed.

/usr/bin/olpc-brightness is in olpc-kbdshim-common 12-3.

This file is owned by root:root, with mode 0o755.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/bin/sh

# adjust brightness of the OLPC XO backlight

usage()
{
    	echo "usage: ${0##*/} [up|down|max|min|<0-15>]"
	exit 1;
}

LEVEL=/sys/class/backlight/dcon-bl/brightness
MONOMODE=/sys/devices/platform/dcon/output

read curbright < $LEVEL

case $1 in
    "")	# no argument, just report current value
	    echo $curbright
	    exit
	    ;;
    max|high)
	    newbright=15
	    ;;
    min|low)
	    newbright=0
	    ;;
    up)
	    newbright=$(($curbright + 1))
	    newbright=$(( ( $newbright > 15 ) ? 15 : $newbright ))
	    ;;
    down)
	    newbright=$(($curbright - 1))
	    newbright=$(( ( $newbright < 0 ) ? 0 : $newbright ))
	    ;;

    [0-9]|1[0-5])
	    newbright=$1
	    ;;
    *)
	    usage
	    ;;
esac

monochrome=$(( newbright == 0 ))

# POWEREVENTS=/var/run/powerevents
# echo "brightness $newbright $monochrome" > $POWEREVENTS

echo $newbright >$LEVEL
echo $monochrome >$MONOMODE