aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xprefdm8
1 files changed, 4 insertions, 4 deletions
diff --git a/prefdm b/prefdm
index b014f56a..f6452de9 100755
--- a/prefdm
+++ b/prefdm
@@ -1,13 +1,13 @@
#!/bin/sh
-# Set preferred X display manager link
+# Run preferred X display manager
preferred=
if [ -f /etc/sysconfig/desktop ]; then
- if [ -n "grep GNOME /etc/sysconfig/desktop" ]; then
+ if grep -q GNOME /etc/sysconfig/desktop 2>/dev/null; then
preferred=gdm
- elif [ -n "grep KDE /etc/sysconfig/desktop" ]; then
+ elif grep -q KDE /etc/sysconfig/desktop 2> /dev/null; then
preferred=kdm
- elif [ -n "grep AnotherLevel /etc/sysconfig/desktop" ]; then
+ elif grep -q AnotherLevel /etc/sysconfig/desktop 2> /dev/null; then
preferred=xdm
fi
fi