#! /bin/bash scriptname=$(basename "$0") statefile=/sys/power/state lcdfile=/proc/omnibook/lcd lockfile=/var/lock/restabit.lock powerlock=/var/lock/acpi_power function usage() { cat >&2 < "${statefile}" # Sometimes the LCDs brightness is incorrect, this attempts to fix that. if [ -f "${lcdfile}" ]; then cur=$(awk '{ print $NF }' < "${lcdfile}") [ "${cur}" -eq 1 ] && tmp=2 || tmp=1 echo "${tmp}" > "${lcdfile}" echo "${cur}" > "${lcdfile}" fi # For the sake of any hacks ... sleep 1