+# Save a copy of the user's SHELL value and restore after dbus-launch command
+shell_saved=$SHELL
+
+# Tell dbus-launch we want the environment value in ksh compatible syntax
+export SHELL=/bin/ksh
+eval `dbus-launch --exit-with-session --sh-syntax`
+
+# unset SHELL and restore user's value
+unset SHELL
+export SHELL=$shell_saved

Wouldn't that be more simply expressed by replacing all of the above with just
eval `env SHELL=/bin/ksh dbus-launch --exit-with-session --sh-syntax`

to only set the SHELL for that command, and not have to worry about
saving/resetting?

-- 
        -Alan Coopersmith-           alan.coopersmith at sun.com
         Sun Microsystems, Inc. - X Window System Engineering


Reply via email to