Skip to content

Commit 071d57b

Browse files
authored
Merge pull request #275 from jmtd/simplify-bash
[OPENJDK-628] run: explicitly specify bash; simplify shell handling
2 parents d73f634 + fd4127f commit 071d57b

File tree

1 file changed

+2
-12
lines changed
  • modules/run/artifacts/opt/jboss/container/java/run

1 file changed

+2
-12
lines changed

modules/run/artifacts/opt/jboss/container/java/run/run-java.sh

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/sh
1+
#!/bin/bash
22

33
# Fail on a single failed command
44
set -eo pipefail
@@ -202,18 +202,8 @@ get_classpath() {
202202

203203
# Set process name if possible
204204
get_exec_args() {
205-
EXEC_ARGS=""
206205
if [ "x${JAVA_APP_NAME}" != x ]; then
207-
# Not all shells support the 'exec -a newname' syntax..
208-
`exec -a test true 2>/dev/null`
209-
if [ "$?" = 0 ] ; then
210-
echo "-a '${JAVA_APP_NAME}'"
211-
else
212-
# Lets switch to bash if you have it installed...
213-
if [ -f "/bin/bash" ] ; then
214-
exec "/bin/bash" $0 $@
215-
fi
216-
fi
206+
echo "-a '${JAVA_APP_NAME}'"
217207
fi
218208
}
219209

0 commit comments

Comments
 (0)