karaf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbono...@apache.org
Subject [21/50] [abbrv] karaf git commit: [KARAF-4628] [KARAF-4564] Fix unix startup scripts
Date Mon, 22 Aug 2016 09:30:19 GMT
[KARAF-4628] [KARAF-4564] Fix unix startup scripts

Project: http://git-wip-us.apache.org/repos/asf/karaf/repo
Commit: http://git-wip-us.apache.org/repos/asf/karaf/commit/7c7e5cb4
Tree: http://git-wip-us.apache.org/repos/asf/karaf/tree/7c7e5cb4
Diff: http://git-wip-us.apache.org/repos/asf/karaf/diff/7c7e5cb4

Branch: refs/heads/master
Commit: 7c7e5cb420b8a0627fe7ffeb6ae380f2d8030f00
Parents: 69c3880
Author: Guillaume Nodet <gnodet@apache.org>
Authored: Fri Jul 29 09:08:03 2016 +0200
Committer: Jean-Baptiste Onofré <jbonofre@apache.org>
Committed: Mon Aug 22 11:29:20 2016 +0200

----------------------------------------------------------------------
 .../main/filtered-resources/resources/bin/client  | 18 ++++++++++++++----
 .../filtered-resources/resources/bin/instance     | 18 ++++++++++++++----
 .../main/filtered-resources/resources/bin/shell   | 18 ++++++++++++++----
 .../main/filtered-resources/resources/bin/start   | 18 ++++++++++++++----
 .../main/filtered-resources/resources/bin/status  | 18 ++++++++++++++----
 .../main/filtered-resources/resources/bin/stop    | 18 ++++++++++++++----
 .../base/src/main/resources/resources/bin/karaf   | 18 ++++++++++++++----
 7 files changed, 98 insertions(+), 28 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/karaf/blob/7c7e5cb4/assemblies/features/base/src/main/filtered-resources/resources/bin/client
----------------------------------------------------------------------
diff --git a/assemblies/features/base/src/main/filtered-resources/resources/bin/client b/assemblies/features/base/src/main/filtered-resources/resources/bin/client
index 6a9be4c..1012fcc 100755
--- a/assemblies/features/base/src/main/filtered-resources/resources/bin/client
+++ b/assemblies/features/base/src/main/filtered-resources/resources/bin/client
@@ -16,10 +16,20 @@
 #    limitations under the License.
 #
 
-REALNAME=`readlink -e "$0" > /dev/null 2>&1`
-if [ $? != 0 ]; then
-    REALNAME=$0
-fi
+realpath() {
+  OURPWD=${PWD}
+  cd "$(dirname "${1}")"
+  LINK=$(readlink "$(basename "${1}")")
+  while [ "${LINK}" ]; do
+    cd "$(dirname "${LINK}")"
+    LINK=$(readlink "$(basename "${1}")")
+  done
+  REALPATH="${PWD}/$(basename "${1}")"
+  cd "${OURPWD}"
+  echo "${REALPATH}"
+}
+
+REALNAME=$(realpath "$0")
 DIRNAME=$(dirname "${REALNAME}")
 PROGNAME=$(basename "${REALNAME}")
 

http://git-wip-us.apache.org/repos/asf/karaf/blob/7c7e5cb4/assemblies/features/base/src/main/filtered-resources/resources/bin/instance
----------------------------------------------------------------------
diff --git a/assemblies/features/base/src/main/filtered-resources/resources/bin/instance b/assemblies/features/base/src/main/filtered-resources/resources/bin/instance
index 3eff681..e26668b 100755
--- a/assemblies/features/base/src/main/filtered-resources/resources/bin/instance
+++ b/assemblies/features/base/src/main/filtered-resources/resources/bin/instance
@@ -16,10 +16,20 @@
 #    limitations under the License.
 #
 
-REALNAME=`readlink -e "$0" > /dev/null 2>&1`
-if [ $? != 0 ]; then
-    REALNAME=$0
-fi
+realpath() {
+  OURPWD=${PWD}
+  cd "$(dirname "${1}")"
+  LINK=$(readlink "$(basename "${1}")")
+  while [ "${LINK}" ]; do
+    cd "$(dirname "${LINK}")"
+    LINK=$(readlink "$(basename "${1}")")
+  done
+  REALPATH="${PWD}/$(basename "${1}")"
+  cd "${OURPWD}"
+  echo "${REALPATH}"
+}
+
+REALNAME=$(realpath "$0")
 DIRNAME=$(dirname "${REALNAME}")
 PROGNAME=$(basename "${REALNAME}")
 

http://git-wip-us.apache.org/repos/asf/karaf/blob/7c7e5cb4/assemblies/features/base/src/main/filtered-resources/resources/bin/shell
----------------------------------------------------------------------
diff --git a/assemblies/features/base/src/main/filtered-resources/resources/bin/shell b/assemblies/features/base/src/main/filtered-resources/resources/bin/shell
index 66dde7b..cbdbfc3 100755
--- a/assemblies/features/base/src/main/filtered-resources/resources/bin/shell
+++ b/assemblies/features/base/src/main/filtered-resources/resources/bin/shell
@@ -16,10 +16,20 @@
 #    limitations under the License.
 #
 
-REALNAME=`readlink -e "$0" > /dev/null 2>&1`
-if [ $? != 0 ]; then
-    REALNAME=$0
-fi
+realpath() {
+  OURPWD=${PWD}
+  cd "$(dirname "${1}")"
+  LINK=$(readlink "$(basename "${1}")")
+  while [ "${LINK}" ]; do
+    cd "$(dirname "${LINK}")"
+    LINK=$(readlink "$(basename "${1}")")
+  done
+  REALPATH="${PWD}/$(basename "${1}")"
+  cd "${OURPWD}"
+  echo "${REALPATH}"
+}
+
+REALNAME=$(realpath "$0")
 DIRNAME=$(dirname "${REALNAME}")
 PROGNAME=$(basename "${REALNAME}")
 

http://git-wip-us.apache.org/repos/asf/karaf/blob/7c7e5cb4/assemblies/features/base/src/main/filtered-resources/resources/bin/start
----------------------------------------------------------------------
diff --git a/assemblies/features/base/src/main/filtered-resources/resources/bin/start b/assemblies/features/base/src/main/filtered-resources/resources/bin/start
index 710e9ec..b700006 100755
--- a/assemblies/features/base/src/main/filtered-resources/resources/bin/start
+++ b/assemblies/features/base/src/main/filtered-resources/resources/bin/start
@@ -16,10 +16,20 @@
 #    limitations under the License.
 #
 
-REALNAME=`readlink -e "$0" > /dev/null 2>&1`
-if [ $? != 0 ]; then
-    REALNAME=$0
-fi
+realpath() {
+  OURPWD=${PWD}
+  cd "$(dirname "${1}")"
+  LINK=$(readlink "$(basename "${1}")")
+  while [ "${LINK}" ]; do
+    cd "$(dirname "${LINK}")"
+    LINK=$(readlink "$(basename "${1}")")
+  done
+  REALPATH="${PWD}/$(basename "${1}")"
+  cd "${OURPWD}"
+  echo "${REALPATH}"
+}
+
+REALNAME=$(realpath "$0")
 DIRNAME=$(dirname "${REALNAME}")
 PROGNAME=$(basename "${REALNAME}")
 

http://git-wip-us.apache.org/repos/asf/karaf/blob/7c7e5cb4/assemblies/features/base/src/main/filtered-resources/resources/bin/status
----------------------------------------------------------------------
diff --git a/assemblies/features/base/src/main/filtered-resources/resources/bin/status b/assemblies/features/base/src/main/filtered-resources/resources/bin/status
index c0cd796..31e9e17 100755
--- a/assemblies/features/base/src/main/filtered-resources/resources/bin/status
+++ b/assemblies/features/base/src/main/filtered-resources/resources/bin/status
@@ -16,10 +16,20 @@
 #    limitations under the License.
 #
 
-REALNAME=`readlink -e "$0" > /dev/null 2>&1`
-if [ $? != 0 ]; then
-    REALNAME=$0
-fi
+realpath() {
+  OURPWD=${PWD}
+  cd "$(dirname "${1}")"
+  LINK=$(readlink "$(basename "${1}")")
+  while [ "${LINK}" ]; do
+    cd "$(dirname "${LINK}")"
+    LINK=$(readlink "$(basename "${1}")")
+  done
+  REALPATH="${PWD}/$(basename "${1}")"
+  cd "${OURPWD}"
+  echo "${REALPATH}"
+}
+
+REALNAME=$(realpath "$0")
 DIRNAME=$(dirname "${REALNAME}")
 PROGNAME=$(basename "${REALNAME}")
 

http://git-wip-us.apache.org/repos/asf/karaf/blob/7c7e5cb4/assemblies/features/base/src/main/filtered-resources/resources/bin/stop
----------------------------------------------------------------------
diff --git a/assemblies/features/base/src/main/filtered-resources/resources/bin/stop b/assemblies/features/base/src/main/filtered-resources/resources/bin/stop
index bb7eb72..35a698b 100755
--- a/assemblies/features/base/src/main/filtered-resources/resources/bin/stop
+++ b/assemblies/features/base/src/main/filtered-resources/resources/bin/stop
@@ -16,10 +16,20 @@
 #    limitations under the License.
 #
 
-REALNAME=`readlink -e "$0" > /dev/null 2>&1`
-if [ $? != 0 ]; then
-    REALNAME=$0
-fi
+realpath() {
+  OURPWD=${PWD}
+  cd "$(dirname "${1}")"
+  LINK=$(readlink "$(basename "${1}")")
+  while [ "${LINK}" ]; do
+    cd "$(dirname "${LINK}")"
+    LINK=$(readlink "$(basename "${1}")")
+  done
+  REALPATH="${PWD}/$(basename "${1}")"
+  cd "${OURPWD}"
+  echo "${REALPATH}"
+}
+
+REALNAME=$(realpath "$0")
 DIRNAME=$(dirname "${REALNAME}")
 PROGNAME=$(basename "${REALNAME}")
 

http://git-wip-us.apache.org/repos/asf/karaf/blob/7c7e5cb4/assemblies/features/base/src/main/resources/resources/bin/karaf
----------------------------------------------------------------------
diff --git a/assemblies/features/base/src/main/resources/resources/bin/karaf b/assemblies/features/base/src/main/resources/resources/bin/karaf
index 5a0487a..761c68a 100755
--- a/assemblies/features/base/src/main/resources/resources/bin/karaf
+++ b/assemblies/features/base/src/main/resources/resources/bin/karaf
@@ -16,10 +16,20 @@
 #    limitations under the License.
 #
 
-REALNAME=`readlink -e "$0" > /dev/null 2>&1`
-if [ $? != 0 ]; then
-    REALNAME=$0
-fi
+realpath() {
+  OURPWD=${PWD}
+  cd "$(dirname "${1}")"
+  LINK=$(readlink "$(basename "${1}")")
+  while [ "${LINK}" ]; do
+    cd "$(dirname "${LINK}")"
+    LINK=$(readlink "$(basename "${1}")")
+  done
+  REALPATH="${PWD}/$(basename "${1}")"
+  cd "${OURPWD}"
+  echo "${REALPATH}"
+}
+
+REALNAME=$(realpath "$0")
 DIRNAME=$(dirname "${REALNAME}")
 PROGNAME=$(basename "${REALNAME}")
 


Mime
View raw message