karaf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject karaf git commit: [KARAF-4865] Karaf startup no longer works on platforms without "readlink" [KARAF-4564] Can't start karaf using symbolic link
Date Wed, 07 Dec 2016 15:17:55 GMT
Repository: karaf
Updated Branches:
  refs/heads/karaf-4.0.x f6d9c8bde -> 2af48c557


[KARAF-4865] Karaf startup no longer works on platforms without "readlink"
[KARAF-4564] Can't start karaf using symbolic link

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

Branch: refs/heads/karaf-4.0.x
Commit: 2af48c557bd6bafb44ae2935e90212c36c416ac2
Parents: f6d9c8b
Author: Guillaume Nodet <gnodet@apache.org>
Authored: Wed Dec 7 16:17:47 2016 +0100
Committer: Guillaume Nodet <gnodet@apache.org>
Committed: Wed Dec 7 16:17:47 2016 +0100

----------------------------------------------------------------------
 .../src/main/filtered-resources/resources/bin/client     | 11 ++++++-----
 .../src/main/filtered-resources/resources/bin/instance   | 11 ++++++-----
 .../base/src/main/filtered-resources/resources/bin/shell | 11 ++++++-----
 .../base/src/main/filtered-resources/resources/bin/start | 11 ++++++-----
 .../src/main/filtered-resources/resources/bin/status     | 11 ++++++-----
 .../base/src/main/filtered-resources/resources/bin/stop  | 11 ++++++-----
 .../features/base/src/main/resources/resources/bin/karaf | 11 ++++++-----
 7 files changed, 42 insertions(+), 35 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/karaf/blob/2af48c55/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 1012fcc..49dc794 100755
--- a/assemblies/features/base/src/main/filtered-resources/resources/bin/client
+++ b/assemblies/features/base/src/main/filtered-resources/resources/bin/client
@@ -18,14 +18,15 @@
 
 realpath() {
   OURPWD=${PWD}
-  cd "$(dirname "${1}")"
-  LINK=$(readlink "$(basename "${1}")")
+  cd "$(dirname "${1}")" || exit 2
+  LINK=$(ls -l "$(basename "${1}")" | awk -F"-> " '{print $2}')
   while [ "${LINK}" ]; do
-    cd "$(dirname "${LINK}")"
-    LINK=$(readlink "$(basename "${1}")")
+          echo "link: ${LINK}" >&2
+    cd "$(dirname "${LINK}")" || exit 2
+    LINK=$(ls -l "$(basename "${1}")" | awk -F"-> " '{print $2}')
   done
   REALPATH="${PWD}/$(basename "${1}")"
-  cd "${OURPWD}"
+  cd "${OURPWD}" || exit 2
   echo "${REALPATH}"
 }
 

http://git-wip-us.apache.org/repos/asf/karaf/blob/2af48c55/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 e26668b..c7966e1 100755
--- a/assemblies/features/base/src/main/filtered-resources/resources/bin/instance
+++ b/assemblies/features/base/src/main/filtered-resources/resources/bin/instance
@@ -18,14 +18,15 @@
 
 realpath() {
   OURPWD=${PWD}
-  cd "$(dirname "${1}")"
-  LINK=$(readlink "$(basename "${1}")")
+  cd "$(dirname "${1}")" || exit 2
+  LINK=$(ls -l "$(basename "${1}")" | awk -F"-> " '{print $2}')
   while [ "${LINK}" ]; do
-    cd "$(dirname "${LINK}")"
-    LINK=$(readlink "$(basename "${1}")")
+          echo "link: ${LINK}" >&2
+    cd "$(dirname "${LINK}")" || exit 2
+    LINK=$(ls -l "$(basename "${1}")" | awk -F"-> " '{print $2}')
   done
   REALPATH="${PWD}/$(basename "${1}")"
-  cd "${OURPWD}"
+  cd "${OURPWD}" || exit 2
   echo "${REALPATH}"
 }
 

http://git-wip-us.apache.org/repos/asf/karaf/blob/2af48c55/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 cbdbfc3..3fabb07 100755
--- a/assemblies/features/base/src/main/filtered-resources/resources/bin/shell
+++ b/assemblies/features/base/src/main/filtered-resources/resources/bin/shell
@@ -18,14 +18,15 @@
 
 realpath() {
   OURPWD=${PWD}
-  cd "$(dirname "${1}")"
-  LINK=$(readlink "$(basename "${1}")")
+  cd "$(dirname "${1}")" || exit 2
+  LINK=$(ls -l "$(basename "${1}")" | awk -F"-> " '{print $2}')
   while [ "${LINK}" ]; do
-    cd "$(dirname "${LINK}")"
-    LINK=$(readlink "$(basename "${1}")")
+          echo "link: ${LINK}" >&2
+    cd "$(dirname "${LINK}")" || exit 2
+    LINK=$(ls -l "$(basename "${1}")" | awk -F"-> " '{print $2}')
   done
   REALPATH="${PWD}/$(basename "${1}")"
-  cd "${OURPWD}"
+  cd "${OURPWD}" || exit 2
   echo "${REALPATH}"
 }
 

http://git-wip-us.apache.org/repos/asf/karaf/blob/2af48c55/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 b700006..4f3d98e 100755
--- a/assemblies/features/base/src/main/filtered-resources/resources/bin/start
+++ b/assemblies/features/base/src/main/filtered-resources/resources/bin/start
@@ -18,14 +18,15 @@
 
 realpath() {
   OURPWD=${PWD}
-  cd "$(dirname "${1}")"
-  LINK=$(readlink "$(basename "${1}")")
+  cd "$(dirname "${1}")" || exit 2
+  LINK=$(ls -l "$(basename "${1}")" | awk -F"-> " '{print $2}')
   while [ "${LINK}" ]; do
-    cd "$(dirname "${LINK}")"
-    LINK=$(readlink "$(basename "${1}")")
+          echo "link: ${LINK}" >&2
+    cd "$(dirname "${LINK}")" || exit 2
+    LINK=$(ls -l "$(basename "${1}")" | awk -F"-> " '{print $2}')
   done
   REALPATH="${PWD}/$(basename "${1}")"
-  cd "${OURPWD}"
+  cd "${OURPWD}" || exit 2
   echo "${REALPATH}"
 }
 

http://git-wip-us.apache.org/repos/asf/karaf/blob/2af48c55/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 31e9e17..48390ff 100755
--- a/assemblies/features/base/src/main/filtered-resources/resources/bin/status
+++ b/assemblies/features/base/src/main/filtered-resources/resources/bin/status
@@ -18,14 +18,15 @@
 
 realpath() {
   OURPWD=${PWD}
-  cd "$(dirname "${1}")"
-  LINK=$(readlink "$(basename "${1}")")
+  cd "$(dirname "${1}")" || exit 2
+  LINK=$(ls -l "$(basename "${1}")" | awk -F"-> " '{print $2}')
   while [ "${LINK}" ]; do
-    cd "$(dirname "${LINK}")"
-    LINK=$(readlink "$(basename "${1}")")
+          echo "link: ${LINK}" >&2
+    cd "$(dirname "${LINK}")" || exit 2
+    LINK=$(ls -l "$(basename "${1}")" | awk -F"-> " '{print $2}')
   done
   REALPATH="${PWD}/$(basename "${1}")"
-  cd "${OURPWD}"
+  cd "${OURPWD}" || exit 2
   echo "${REALPATH}"
 }
 

http://git-wip-us.apache.org/repos/asf/karaf/blob/2af48c55/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 695884e..a4eed60 100755
--- a/assemblies/features/base/src/main/filtered-resources/resources/bin/stop
+++ b/assemblies/features/base/src/main/filtered-resources/resources/bin/stop
@@ -18,14 +18,15 @@
 
 realpath() {
   OURPWD=${PWD}
-  cd "$(dirname "${1}")"
-  LINK=$(readlink "$(basename "${1}")")
+  cd "$(dirname "${1}")" || exit 2
+  LINK=$(ls -l "$(basename "${1}")" | awk -F"-> " '{print $2}')
   while [ "${LINK}" ]; do
-    cd "$(dirname "${LINK}")"
-    LINK=$(readlink "$(basename "${1}")")
+          echo "link: ${LINK}" >&2
+    cd "$(dirname "${LINK}")" || exit 2
+    LINK=$(ls -l "$(basename "${1}")" | awk -F"-> " '{print $2}')
   done
   REALPATH="${PWD}/$(basename "${1}")"
-  cd "${OURPWD}"
+  cd "${OURPWD}" || exit 2
   echo "${REALPATH}"
 }
 

http://git-wip-us.apache.org/repos/asf/karaf/blob/2af48c55/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 ea55187..1fdd0aa 100755
--- a/assemblies/features/base/src/main/resources/resources/bin/karaf
+++ b/assemblies/features/base/src/main/resources/resources/bin/karaf
@@ -18,14 +18,15 @@
 
 realpath() {
   OURPWD=${PWD}
-  cd "$(dirname "${1}")"
-  LINK=$(readlink "$(basename "${1}")")
+  cd "$(dirname "${1}")" || exit 2
+  LINK=$(ls -l "$(basename "${1}")" | awk -F"-> " '{print $2}')
   while [ "${LINK}" ]; do
-    cd "$(dirname "${LINK}")"
-    LINK=$(readlink "$(basename "${1}")")
+          echo "link: ${LINK}" >&2
+    cd "$(dirname "${LINK}")" || exit 2
+    LINK=$(ls -l "$(basename "${1}")" | awk -F"-> " '{print $2}')
   done
   REALPATH="${PWD}/$(basename "${1}")"
-  cd "${OURPWD}"
+  cd "${OURPWD}" || exit 2
   echo "${REALPATH}"
 }
 


Mime
View raw message