diff --git a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/command/CommandMinerThread.java b/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/command/CommandMinerThread.java index 51f92d677ed..83fc0a108c8 100644 --- a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/command/CommandMinerThread.java +++ b/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/command/CommandMinerThread.java @@ -22,6 +22,7 @@ * David McKnight (IBM) [153275] [dstore-shells] Ctrl+C does not break remote program * David McKnight (IBM) [284179] [dstore] commands have a hard coded line length limit of 100 characters * David McKnight (IBM) - [286671] Dstore shell service interprets < and > sequences + * David McKnight (IBM) [290743] [dstore][shells] allow bash shells and custom shell invocation *******************************************************************************/ package org.eclipse.rse.internal.dstore.universal.miners.command; @@ -198,10 +199,7 @@ public class CommandMinerThread extends MinerThread } else { - isBash = true; - // no bash! - theShell = "sh"; //$NON-NLS-1$ - + isBash = true; } } else if (theShell.endsWith("sh") && isZ)//$NON-NLS-1$ @@ -220,6 +218,11 @@ public class CommandMinerThread extends MinerThread } } + // check for custom shell invocation + String customShellInvocation = System.getProperty("DSTORE_SHELL_INVOCATION"); //$NON-NLS-1$ + if (customShellInvocation != null && customShellInvocation.length() > 0){ + theShell = customShellInvocation; + } if (theShell == null) { @@ -320,25 +323,31 @@ public class CommandMinerThread extends MinerThread } else { - if (isBashonZ) - { - _theProcess = Runtime.getRuntime().exec(_invocation + " --login", env, theDirectory); //$NON-NLS-1$ - didLogin = true; - } - else if (isBash) - { - _theProcess = Runtime.getRuntime().exec(_invocation + " -l", env, theDirectory); //$NON-NLS-1$ - didLogin = true; - } - else if (isSHonZ) - { - _theProcess = Runtime.getRuntime().exec(_invocation + " -L", env, theDirectory); //$NON-NLS-1$ - didLogin = true; - } - else - { + if (customShellInvocation != null && customShellInvocation.length() > 0){ + // all handled in the custom shell invocation _theProcess = Runtime.getRuntime().exec(_invocation, env, theDirectory); } + else { + if (isBashonZ) + { + _theProcess = Runtime.getRuntime().exec(_invocation + " --login", env, theDirectory); //$NON-NLS-1$ + didLogin = true; + } + else if (isBash) + { + _theProcess = Runtime.getRuntime().exec(_invocation + " -l", env, theDirectory); //$NON-NLS-1$ + didLogin = true; + } + else if (isSHonZ) + { + _theProcess = Runtime.getRuntime().exec(_invocation + " -L", env, theDirectory); //$NON-NLS-1$ + didLogin = true; + } + else + { + _theProcess = Runtime.getRuntime().exec(_invocation, env, theDirectory); + } + } } } else