Bug 145856

Summary: kdebase/workspace/startkde runs as /bin/sh, which is bourne shell, but uses bash syntax
Product: [Plasma] kstart Reporter: Steve Evans <stevee>
Component: generalAssignee: Lubos Lunak <l.lunak>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Solaris   
Latest Commit: Version Fixed In:

Description Steve Evans 2007-05-23 15:47:37 UTC
Version:            (using KDE Devel)
Installed from:    Compiled sources
Compiler:          gcc 3.4.6 
OS:                Solaris

(sorry, this is for startkde, not kstart)

startkde has the line:

if ! qdbus >/dev/null 2>/dev/null; then

which gives this error under /bin/sh on Solaris:

/opt/kde/bin/startkde: !: not found

I can fix it (horribly) using

if qdbus >/dev/null 2>/dev/null; then
  :
else
Comment 1 Lubos Lunak 2007-05-24 14:00:56 UTC
SVN commit 667905 by lunakl:

Don't use bash syntax. Since it looks like dbus launching will
be eventually removed anyway, this somewhat ugly way should be ok for now.
BUG: 145856



 M  +6 -2      startkde  


--- trunk/KDE/kdebase/workspace/startkde #667904:667905
@@ -275,11 +275,15 @@
 echo 'startkde: Starting up...'  1>&2
 
 # Make sure that D-Bus is running
-if ! qdbus >/dev/null 2>/dev/null; then
+if qdbus >/dev/null 2>/dev/null; then
+    : # ok
+else
   # Remove the next two lines after D-Bus 1.0 is released.
   # It comes with auto-starting, so running dbus-launch won't be necessary
   eval `dbus-launch --sh-syntax --exit-with-session < /dev/null`
-  if ! qdbus >/dev/null 2>/dev/null; then
+  if qdbus >/dev/null 2>/dev/null; then
+      : # ok
+  else
     # Startup error
     echo 'startkde: Could not start D-Bus. Check your installation.'  1>&2
     xmessage -geometry 500x100 "Could not start D-Bus. Check your installation."