[Pm-utils] [PATCH 13/17] Reverse ordering of the if command_exists ... in 20video

Victor Lowther victor.lowther at gmail.com
Sat Feb 9 18:31:17 PST 2008


This brings this hook inline with 99video, and is easier to read.
---
 pm/sleep.d/20video |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/pm/sleep.d/20video b/pm/sleep.d/20video
index faed5a9..709226c 100755
--- a/pm/sleep.d/20video
+++ b/pm/sleep.d/20video
@@ -9,16 +9,16 @@
 
 . "${PM_FUNCTIONS}"
 
-if ! command_exists vbetool; then
-	vbe() { echo "vbetool not found" 1>&2; return 1; }
-else
+if command_exists vbetool; then
 	vbe() { vbetool "$@"; }
+else 
+	vbe() { echo "vbetool not found" 1>&2; return 1; }
 fi
 
-if ! command_exists radeontool; then
-	radeon() { echo "radeontool not found" 1>&2; return 1; }
-else
+if command_exists radeontool; then
 	radeon() { radeontool "$@"; }
+else
+	radeon() { echo "radeontool not found" 1>&2; return 1; }
 fi
 
 suspend_video()
-- 
1.5.3.8



More information about the Pm-utils mailing list