summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xpm/functions2
-rwxr-xr-xpm/sleep.d/20video4
-rwxr-xr-xpm/sleep.d/99video4
3 files changed, 5 insertions, 5 deletions
diff --git a/pm/functions b/pm/functions
index 6c27a6d..beb7826 100755
--- a/pm/functions
+++ b/pm/functions
@@ -255,7 +255,7 @@ modreload()
done
}
-if type service |grep -q "not found"; then
+if ! command_exists service; then
service() {
if [ -x "/etc/init.d/$1" ]; then
"/etc/init.d/$@"
diff --git a/pm/sleep.d/20video b/pm/sleep.d/20video
index 41e79ad..1beee57 100755
--- a/pm/sleep.d/20video
+++ b/pm/sleep.d/20video
@@ -9,13 +9,13 @@
. /usr/lib/pm-utils/functions
-if type vbetool |grep -q "not found" ; then
+if ! command_exists vbetool; then
vbe() { echo "vbetool not found" 1>&2; return 1; }
else
vbe() { vbetool "$@"; }
fi
-if type radeontool |grep -q "not found" ; then
+if ! command_exists radeontool; then
radeon() { echo "radeontool not found" 1>&2; return 1; }
else
radeon() { radeontool "$@"; }
diff --git a/pm/sleep.d/99video b/pm/sleep.d/99video
index cbba76f..9d06505 100755
--- a/pm/sleep.d/99video
+++ b/pm/sleep.d/99video
@@ -19,13 +19,13 @@ reset_brightness() {
done
}
-if type vbetool |grep -q "not found"; then
+if command_esists vbetool; then
vbe() { echo "vbetool not installed!" 1>&2; return 1; }
else
vbe() { vbetool "$@"; }
fi
-if type radeontool |grep -q "not found"; then
+if command_exists radeontool; then
radeon() { echo "radeontool not found" 1>&2; return 1; }
else
radeon() { radeontool "$@"; }