Bug 145856 - kdebase/workspace/startkde runs as /bin/sh, which is bourne shell, but uses bash syntax
Summary: kdebase/workspace/startkde runs as /bin/sh, which is bourne shell, but uses b...
Status: RESOLVED FIXED
Alias: None
Product: kstart
Classification: Plasma
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Solaris
: NOR normal
Target Milestone: ---
Assignee: Lubos Lunak
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-05-23 15:47 UTC by Steve Evans
Modified: 2007-05-24 14:00 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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."