Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
DISCONTINUED:openSUSE:11.2
pm-utils
pm-utils-0.99.4-QUIRK-variables-changed.diff
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File pm-utils-0.99.4-QUIRK-variables-changed.diff of Package pm-utils
Index: b/pm/hooks/20video =================================================================== --- a/pm/hooks/20video +++ b/pm/hooks/20video @@ -28,36 +28,36 @@ radeon() { } suspend_video() { # 0=nothing, 1=s3_bios, 2=s3_mode, 3=both - if [ "${DISPLAY_QUIRK_S3_BIOS}" == "true" -a \ - "${DISPLAY_QUIRK_S3_MODE}" == "true" ]; then + if [ "${QUIRK_S3_BIOS}" == "true" -a \ + "${QUIRK_S3_MODE}" == "true" ]; then sysctl -w kernel.acpi_video_flags=3 - elif [ "${DISPLAY_QUIRK_S3_BIOS}" == "true" ]; then + elif [ "${QUIRK_S3_BIOS}" == "true" ]; then sysctl -w kernel.acpi_video_flags=1 - elif [ "${DISPLAY_QUIRK_S3_MODE}" == "true" ]; then + elif [ "${QUIRK_S3_MODE}" == "true" ]; then sysctl -w kernel.acpi_video_flags=2 else sysctl -w kernel.acpi_video_flags=0 fi # We might need to do one or many of these quirks - if [ "${DISPLAY_QUIRK_RADEON_OFF}" == "true" ]; then + if [ "${QUIRK_RADEON_OFF}" == "true" ]; then radeon dac off radeon light off fi - if [ "${DISPLAY_QUIRK_VBESTATE_RESTORE}" == "true" ]; then + if [ "${QUIRK_VBESTATE_RESTORE}" == "true" ]; then vbe vbestate save > /var/run/vbestate fi - if [ "${DISPLAY_QUIRK_VBEMODE_RESTORE}" == "true" ]; then + if [ "${QUIRK_VBEMODE_RESTORE}" == "true" ]; then vbe vbemode get > /var/run/vbemode fi - if [ "${DISPLAY_QUIRK_VGA_MODE_3}" == "true" ]; then + if [ "${QUIRK_VGA_MODE_3}" == "true" ]; then vbe vbemode set 3 fi - if [ "${DISPLAY_QUIRK_DPMS_SUSPEND}" == "true" ]; then + if [ "${QUIRK_DPMS_SUSPEND}" == "true" ]; then vbe dpms suspend fi } Index: b/pm/hooks/99video =================================================================== --- a/pm/hooks/99video +++ b/pm/hooks/99video @@ -38,29 +38,29 @@ radeon() { $radeontool "$@" } resume_video() { - if [ "${DISPLAY_QUIRK_RADEON_OFF}" == "true" ]; then + if [ "${QUIRK_RADEON_OFF}" == "true" ]; then radeon dac on radeon light on fi # We might need to do one or many of these quirks - if [ "${DISPLAY_QUIRK_VBE_POST}" == "true" ]; then + if [ "${QUIRK_VBE_POST}" == "true" ]; then vbe post usleep 100000 fi - if [ "${DISPLAY_QUIRK_VBESTATE_RESTORE}" == "true" ]; then + if [ "${QUIRK_VBESTATE_RESTORE}" == "true" ]; then vbe vbestate restore < /var/run/vbestate fi - if [ "${DISPLAY_QUIRK_VBEMODE_RESTORE}" == "true" ]; then + if [ "${QUIRK_VBEMODE_RESTORE}" == "true" ]; then vbe vbemode set `cat /var/run/vbemode` fi - if [ "${DISPLAY_QUIRK_DPMS_ON}" == "true" ]; then + if [ "${QUIRK_DPMS_ON}" == "true" ]; then vbe dpms on fi - if [ "${DISPLAY_QUIRK_RESET_BRIGHTNESS}" == "true" ]; then + if [ "${QUIRK_RESET_BRIGHTNESS}" == "true" ]; then reset_brightness fi } Index: b/src/pm-action =================================================================== --- a/src/pm-action +++ b/src/pm-action @@ -51,42 +51,47 @@ if [ -n "$EUID" -a "$EUID" != "0" ]; the exit 1 fi export LC_COLLATE=C +#export everything +set -a + # Get the command line options while [ $# -gt 0 ] do - case "$1" in - --quirk-dpms-on) - export DISPLAY_QUIRK_DPMS_ON="true" ;; - --quirk-dpms-suspend) - export DISPLAY_QUIRK_DPMS_SUSPEND="true" ;; - --quirk-radeon-off) - export DISPLAY_QUIRK_RADEON_OFF="true" ;; - --quirk-reset-brightness) - export DISPLAY_QUIRK_RESET_BRIGHTNESS="true" ;; - --quirk-s3-bios) - export DISPLAY_QUIRK_S3_BIOS="true" ;; - --quirk-s3-mode) - export DISPLAY_QUIRK_S3_MODE="true" ;; - --quirk-vbe-post) - export DISPLAY_QUIRK_VBE_POST="true" ;; - --quirk-vbemode-restore) - export DISPLAY_QUIRK_VBEMODE_RESTORE="true" ;; - --quirk-vbestate-restore) - export DISPLAY_QUIRK_VBESTATE_RESTORE="true" ;; - --quirk-vga-mode3) - export DISPLAY_QUIRK_VGA_MODE_3="true" ;; - --help) - help_options - exit 0 ;; - *) - break ;; # terminate while loop + # for backwards compatibility, we export the quirks as both + # "QUIRK_*" and "DISPLAY_QUIRK_*" (the old form). + case "${1##--quirk-}" in # just quirks, please + dpms-on) QUIRK_DPMS_ON="true" + DISPLAY_QUIRK_DPMS_ON="true" ;; + dpms-suspend) QUIRK_DPMS_SUSPEND="true" + DISPLAY_QUIRK_DPMS_SUSPEND="true" ;; + radeon-off) QUIRK_RADEON_OFF="true" + DISPLAY_QUIRK_RADEON_OFF="true" ;; + reset-brightness) QUIRK_RESET_BRIGHTNESS="true" + DISPLAY_QUIRK_RESET_BRIGHTNESS="true" ;; + s3-bios) QUIRK_S3_BIOS="true" + DISPLAY_QUIRK_S3_BIOS="true" ;; + s3-mode) QUIRK_S3_MODE="true" + DISPLAY_QUIRK_S3_MODE="true" ;; + vbe-post) QUIRK_VBE_POST="true" + DISPLAY_QUIRK_VBE_POST="true" ;; + vbemode-restore) QUIRK_VBEMODE_RESTORE="true" + DISPLAY_QUIRK_VBEMODE_RESTORE="true" ;; + vbestate-restore) QUIRK_VBESTATE_RESTORE="true" + DISPLAY_QUIRK_VBESTATE_RESTORE="true" ;; + vga-mode3) QUIRK_VGA_MODE_3="true" + DISPLAY_QUIRK_VGA_MODE_3="true" ;; + none) QUIRK_NONE="true" ;; # there was never a DISPLAY_QUIRK_NONE + --help) help_options + exit 0 ;; + *) echo "info: unknown option '$1' ignored." esac shift done +set +a . /usr/lib/pm-utils/functions [ -f /sys/power/state ] || exit 1
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor