[Pkg-fglrx-devel] r555 - in fglrx-driver/trunk/debian: . acpi acpi/events

Patrick Matthäi pmatthaei at alioth.debian.org
Sun Feb 13 20:42:40 UTC 2011


Author: pmatthaei
Date: 2011-02-13 20:42:38 +0000 (Sun, 13 Feb 2011)
New Revision: 555

Modified:
   fglrx-driver/trunk/debian/acpi/events/fglrx-ac
   fglrx-driver/trunk/debian/acpi/events/fglrx-lid
   fglrx-driver/trunk/debian/acpi/fglrx-powermode.sh
   fglrx-driver/trunk/debian/changelog
Log:
* Cleanup scripts in debian/acpi/.


Modified: fglrx-driver/trunk/debian/acpi/events/fglrx-ac
===================================================================
--- fglrx-driver/trunk/debian/acpi/events/fglrx-ac	2011-02-13 20:21:51 UTC (rev 554)
+++ fglrx-driver/trunk/debian/acpi/events/fglrx-ac	2011-02-13 20:42:38 UTC (rev 555)
@@ -1,6 +1,5 @@
 # /etc/acpi/events/fglrx-ac
 # Called when the user connects/disconnects ac power
-# 
 
 event=ac_adapter
 action=/etc/acpi/fglrx-powermode.sh

Modified: fglrx-driver/trunk/debian/acpi/events/fglrx-lid
===================================================================
--- fglrx-driver/trunk/debian/acpi/events/fglrx-lid	2011-02-13 20:21:51 UTC (rev 554)
+++ fglrx-driver/trunk/debian/acpi/events/fglrx-lid	2011-02-13 20:42:38 UTC (rev 555)
@@ -1,6 +1,5 @@
 # /etc/acpi/events/fglrx-lid
 # Called when the user opens or closes the laptop lid
-# 
 
 event=button[ /]lid
 action=/etc/acpi/fglrx-powermode.sh

Modified: fglrx-driver/trunk/debian/acpi/fglrx-powermode.sh
===================================================================
--- fglrx-driver/trunk/debian/acpi/fglrx-powermode.sh	2011-02-13 20:21:51 UTC (rev 554)
+++ fglrx-driver/trunk/debian/acpi/fglrx-powermode.sh	2011-02-13 20:42:38 UTC (rev 555)
@@ -11,54 +11,54 @@
 [ "${FGLRX_ACPI_SWITCH_POWERSTATES}" != true ] && exit 0
 
 getXuser() {
-        user=`finger| grep -m1 ":$displaynum " | awk '{print $1}'`
-        if [ x"$user" = x"" ]; then
-                user=`finger| grep -m1 ":$displaynum" | awk '{print $1}'`
-        fi
-        if [ x"$user" != x"" ]; then
-                userhome=`getent passwd $user | cut -d: -f6`
-                export XAUTHORITY=$userhome/.Xauthority
-        else
-                export XAUTHORITY=""
-        fi
+	user=`finger| grep -m1 ":$displaynum " | awk '{print $1}'`
+	if [ x"$user" = x"" ]; then
+		user=`finger| grep -m1 ":$displaynum" | awk '{print $1}'`
+	fi
+	if [ x"$user" != x"" ]; then
+		userhome=`getent passwd $user | cut -d: -f6`
+		export XAUTHORITY=$userhome/.Xauthority
+	else
+		export XAUTHORITY=""
+	fi
 }
 
 if grep -q closed /proc/acpi/button/lid/*/state; then
- lid_closed=1
+	lid_closed=1
 else
- lid_closed=0
+	lid_closed=0
 fi
 
 if grep -q off-line /proc/acpi/ac_adapter/*/state; then
-   on_dc=1
+	on_dc=1
 else
-   on_dc=0
+	on_dc=0
 fi
 
 if [ ${lid_closed} -eq 1 ] || [ ${on_dc} -eq 1 ]; then
-    echo "fglrx: setting low power"
-    for x in /tmp/.X11-unix/*; do
-	displaynum=`echo $x | sed s#/tmp/.X11-unix/X##`
-	getXuser;
-	if [ x"$XAUTHORITY" != x"" ]; then
-	    export DISPLAY=":$displaynum"	    
-	    powermode=`/usr/bin/aticonfig --lsp | grep -m1 low | cut -b 3-3`
-	    if [ x"$powermode" != x"" ]; then
-	        su $user -c "/usr/bin/aticonfig --set-powerstate=$powermode --effective=now" >/dev/null 2>&1
-	    fi
-	fi
-    done
+	echo "fglrx: setting low power"
+	for x in /tmp/.X11-unix/*; do
+		displaynum=`echo $x | sed s#/tmp/.X11-unix/X##`
+		getXuser;
+		if [ x"$XAUTHORITY" != x"" ]; then
+			export DISPLAY=":$displaynum"
+			powermode=`/usr/bin/aticonfig --lsp | grep -m1 low | cut -b 3-3`
+			if [ x"$powermode" != x"" ]; then
+				su $user -c "/usr/bin/aticonfig --set-powerstate=$powermode --effective=now" >/dev/null 2>&1
+			fi
+		fi
+	done
 else
-    echo "fglrx: setting default powermode"
-    for x in /tmp/.X11-unix/*; do
-	displaynum=`echo $x | sed s#/tmp/.X11-unix/X##`
-	getXuser;
-	if [ x"$XAUTHORITY" != x"" ]; then
-	    export DISPLAY=":$displaynum"
-	    powermode=`/usr/bin/aticonfig --lsp | grep -m1 default | cut -b 3-3`
-	    if [ x"$powermode" != x"" ]; then
-	        su $user -c "/usr/bin/aticonfig --set-powerstate=$powermode --effective=now" >/dev/null 2>&1
-	    fi
-	fi
-    done
+	echo "fglrx: setting default powermode"
+	for x in /tmp/.X11-unix/*; do
+		displaynum=`echo $x | sed s#/tmp/.X11-unix/X##`
+		getXuser;
+		if [ x"$XAUTHORITY" != x"" ]; then
+			export DISPLAY=":$displaynum"
+			powermode=`/usr/bin/aticonfig --lsp | grep -m1 default | cut -b 3-3`
+			if [ x"$powermode" != x"" ]; then
+				su $user -c "/usr/bin/aticonfig --set-powerstate=$powermode --effective=now" >/dev/null 2>&1
+			fi
+		fi
+	done
 fi

Modified: fglrx-driver/trunk/debian/changelog
===================================================================
--- fglrx-driver/trunk/debian/changelog	2011-02-13 20:21:51 UTC (rev 554)
+++ fglrx-driver/trunk/debian/changelog	2011-02-13 20:42:38 UTC (rev 555)
@@ -3,8 +3,9 @@
   * Add notice in fglrx-driver.postinst, if fglrx is not configured in
     xorg.conf.
     Closes: #613136
+  * Cleanup scripts in debian/acpi/.
 
- -- Patrick Matthäi <pmatthaei at debian.org>  Sun, 13 Feb 2011 21:07:57 +0100
+ -- Patrick Matthäi <pmatthaei at debian.org>  Sun, 13 Feb 2011 21:42:12 +0100
 
 fglrx-driver (1:11-1-3) unstable; urgency=low
 




More information about the Pkg-fglrx-devel mailing list