From d7e65732bc37970ad2f6f31b087077563df6b10f Mon Sep 17 00:00:00 2001 From: Stefano Karapetsas Date: Thu, 24 Apr 2014 20:33:44 +0200 Subject: Rename mate-power-bugreport.sh -> tools/mate-power-manager-bugreport Closes https://github.com/mate-desktop/mate-power-manager/issues/101 --- tools/Makefile.am | 2 +- tools/mate-power-bugreport.sh | 90 -------------------------------------- tools/mate-power-manager-bugreport | 90 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 91 insertions(+), 91 deletions(-) delete mode 100755 tools/mate-power-bugreport.sh create mode 100755 tools/mate-power-manager-bugreport diff --git a/tools/Makefile.am b/tools/Makefile.am index 4cfe958..b4889ae 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -1,5 +1,5 @@ script_SCRIPTS = \ - mate-power-bugreport.sh + mate-power-manager-bugreport EXTRA_DIST=$(script_SCRIPTS) diff --git a/tools/mate-power-bugreport.sh b/tools/mate-power-bugreport.sh deleted file mode 100755 index c6c4ce7..0000000 --- a/tools/mate-power-bugreport.sh +++ /dev/null @@ -1,90 +0,0 @@ -#! /bin/sh -# Copyright (C) 2006-2007 Richard Hughes -# -# Licensed under the GNU General Public License Version 2 -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -#$1 = keyname -print_hal_key () -{ - udi="/org/freedesktop/Hal/devices/computer" - ret=`hal-get-property --udi $udi --key $1 2> /dev/null` - if [ $? -eq 0 ]; then - echo $ret - else - echo "missing" - fi -} - -#$1 = capability -print_hal_capability () -{ - ret=`hal-find-by-capability --capability $1` - if [ -n "$ret" ]; then - echo "yes" - else - echo "no" - fi -} - -echo -n "Distro version: " -cat /etc/*release | uniq - -echo -n "Kernel version: " -uname -r - -echo -n "g-p-m version: " -mate-power-manager --version | cut -f2 -d" " - -echo -n "HAL version: " -lshal -V | cut -f3 -d" " - -echo -n "System manufacturer: " -print_hal_key "smbios.system.manufacturer" -echo -n "System version: " -print_hal_key "smbios.system.version" -echo -n "System product: " -print_hal_key "smbios.system.product" - -echo -n "AC adapter present: " -print_hal_capability "ac_adapter" - -echo -n "Battery present: " -print_hal_capability "battery" - -echo -n "Laptop panel present: " -print_hal_capability "laptop_panel" - -echo -n "CPU scaling present: " -print_hal_capability "cpufreq_control" - -echo "Battery Information:" -lshal | grep "battery\." - -OS=`uname -s` - -echo "UPower data:" -upower --dump - -echo "MATE Power Manager Process Information:" -if [ "$OS" = "SunOS" ]; then - ptree -a `pgrep power` -else - ps aux --forest | grep mate-power | grep -v grep -fi - -echo "HAL Process Information:" -if [ "$OS" = "SunOS" ]; then - ptree -a `pgrep hald` -else - ps aux --forest | grep hald | grep -v grep -fi diff --git a/tools/mate-power-manager-bugreport b/tools/mate-power-manager-bugreport new file mode 100755 index 0000000..c6c4ce7 --- /dev/null +++ b/tools/mate-power-manager-bugreport @@ -0,0 +1,90 @@ +#! /bin/sh +# Copyright (C) 2006-2007 Richard Hughes +# +# Licensed under the GNU General Public License Version 2 +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +#$1 = keyname +print_hal_key () +{ + udi="/org/freedesktop/Hal/devices/computer" + ret=`hal-get-property --udi $udi --key $1 2> /dev/null` + if [ $? -eq 0 ]; then + echo $ret + else + echo "missing" + fi +} + +#$1 = capability +print_hal_capability () +{ + ret=`hal-find-by-capability --capability $1` + if [ -n "$ret" ]; then + echo "yes" + else + echo "no" + fi +} + +echo -n "Distro version: " +cat /etc/*release | uniq + +echo -n "Kernel version: " +uname -r + +echo -n "g-p-m version: " +mate-power-manager --version | cut -f2 -d" " + +echo -n "HAL version: " +lshal -V | cut -f3 -d" " + +echo -n "System manufacturer: " +print_hal_key "smbios.system.manufacturer" +echo -n "System version: " +print_hal_key "smbios.system.version" +echo -n "System product: " +print_hal_key "smbios.system.product" + +echo -n "AC adapter present: " +print_hal_capability "ac_adapter" + +echo -n "Battery present: " +print_hal_capability "battery" + +echo -n "Laptop panel present: " +print_hal_capability "laptop_panel" + +echo -n "CPU scaling present: " +print_hal_capability "cpufreq_control" + +echo "Battery Information:" +lshal | grep "battery\." + +OS=`uname -s` + +echo "UPower data:" +upower --dump + +echo "MATE Power Manager Process Information:" +if [ "$OS" = "SunOS" ]; then + ptree -a `pgrep power` +else + ps aux --forest | grep mate-power | grep -v grep +fi + +echo "HAL Process Information:" +if [ "$OS" = "SunOS" ]; then + ptree -a `pgrep hald` +else + ps aux --forest | grep hald | grep -v grep +fi -- cgit v1.2.1