[PATCH 10/10] hal: Clean up scripts in tools

Victor Lowther victor.lowther at gmail.com
Tue Mar 25 18:49:05 PDT 2008


hal-system-video-(resume|suspend) essentially duplicate hal_exec_backend.

Just make them use hal_exec_backend directly.
---
 tools/hal-system-video-resume  |   10 +++-------
 tools/hal-system-video-suspend |   10 +++-------
 2 files changed, 6 insertions(+), 14 deletions(-)

diff --git a/tools/hal-system-video-resume b/tools/hal-system-video-resume
index f529e15..4a66c71 100755
--- a/tools/hal-system-video-resume
+++ b/tools/hal-system-video-resume
@@ -1,9 +1,5 @@
 #!/bin/sh
 
-if [ -n "$HALD_UNAME_S" -a -x ./$HALD_UNAME_S/hal-system-video-resume-$HALD_UNAME_S ]; then
-    exec ./$HALD_UNAME_S/hal-system-video-resume-$HALD_UNAME_S $@
-else
-    echo "org.freedesktop.Hal.Device.UnknownError" >&2
-    echo "No back-end for your operating system" >&2
-    exit 1
-fi
+. hal-functions
+
+hal_exec_backend
diff --git a/tools/hal-system-video-suspend b/tools/hal-system-video-suspend
index 26c2bd3..4a66c71 100755
--- a/tools/hal-system-video-suspend
+++ b/tools/hal-system-video-suspend
@@ -1,9 +1,5 @@
 #!/bin/sh
 
-if [ -n "$HALD_UNAME_S" -a -x ./$HALD_UNAME_S/hal-system-video-suspend-$HALD_UNAME_S ]; then
-    exec ./$HALD_UNAME_S/hal-system-video-suspend-$HALD_UNAME_S $@
-else
-    echo "org.freedesktop.Hal.Device.UnknownError" >&2
-    echo "No back-end for your operating system" >&2
-    exit 1
-fi
+. hal-functions
+
+hal_exec_backend
-- 
1.5.4.3



More information about the hal mailing list