karaf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject [2/2] 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:23:03 GMT
[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/299b6fbb
Tree: http://git-wip-us.apache.org/repos/asf/karaf/tree/299b6fbb
Diff: http://git-wip-us.apache.org/repos/asf/karaf/diff/299b6fbb

Branch: refs/heads/karaf-3.0.x
Commit: 299b6fbb7d33d7a901323f6928154738ad285490
Parents: fa8de13
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:20:47 2016 +0100

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


http://git-wip-us.apache.org/repos/asf/karaf/blob/299b6fbb/assemblies/features/framework/src/main/filtered-resources/resources/bin/client
----------------------------------------------------------------------
diff --git a/assemblies/features/framework/src/main/filtered-resources/resources/bin/client
b/assemblies/features/framework/src/main/filtered-resources/resources/bin/client
index 3b60a9a..277194e 100755
--- a/assemblies/features/framework/src/main/filtered-resources/resources/bin/client
+++ b/assemblies/features/framework/src/main/filtered-resources/resources/bin/client
@@ -18,14 +18,14 @@
 
 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}")")
+    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/299b6fbb/assemblies/features/framework/src/main/filtered-resources/resources/bin/instance
----------------------------------------------------------------------
diff --git a/assemblies/features/framework/src/main/filtered-resources/resources/bin/instance
b/assemblies/features/framework/src/main/filtered-resources/resources/bin/instance
index 535c339..a037be8 100755
--- a/assemblies/features/framework/src/main/filtered-resources/resources/bin/instance
+++ b/assemblies/features/framework/src/main/filtered-resources/resources/bin/instance
@@ -18,14 +18,14 @@
 
 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}")")
+    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/299b6fbb/assemblies/features/framework/src/main/filtered-resources/resources/bin/shell
----------------------------------------------------------------------
diff --git a/assemblies/features/framework/src/main/filtered-resources/resources/bin/shell
b/assemblies/features/framework/src/main/filtered-resources/resources/bin/shell
index 5434a49..1d68adf 100755
--- a/assemblies/features/framework/src/main/filtered-resources/resources/bin/shell
+++ b/assemblies/features/framework/src/main/filtered-resources/resources/bin/shell
@@ -18,14 +18,14 @@
 
 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}")")
+    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/299b6fbb/assemblies/features/framework/src/main/filtered-resources/resources/bin/start
----------------------------------------------------------------------
diff --git a/assemblies/features/framework/src/main/filtered-resources/resources/bin/start
b/assemblies/features/framework/src/main/filtered-resources/resources/bin/start
index b700006..79ecff8 100755
--- a/assemblies/features/framework/src/main/filtered-resources/resources/bin/start
+++ b/assemblies/features/framework/src/main/filtered-resources/resources/bin/start
@@ -18,14 +18,14 @@
 
 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}")")
+    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/299b6fbb/assemblies/features/framework/src/main/filtered-resources/resources/bin/status
----------------------------------------------------------------------
diff --git a/assemblies/features/framework/src/main/filtered-resources/resources/bin/status
b/assemblies/features/framework/src/main/filtered-resources/resources/bin/status
index 07fb50a..6a0d0ea 100755
--- a/assemblies/features/framework/src/main/filtered-resources/resources/bin/status
+++ b/assemblies/features/framework/src/main/filtered-resources/resources/bin/status
@@ -18,14 +18,14 @@
 
 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}")")
+    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/299b6fbb/assemblies/features/framework/src/main/filtered-resources/resources/bin/stop
----------------------------------------------------------------------
diff --git a/assemblies/features/framework/src/main/filtered-resources/resources/bin/stop
b/assemblies/features/framework/src/main/filtered-resources/resources/bin/stop
index 695884e..0ab43ee 100755
--- a/assemblies/features/framework/src/main/filtered-resources/resources/bin/stop
+++ b/assemblies/features/framework/src/main/filtered-resources/resources/bin/stop
@@ -18,14 +18,14 @@
 
 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}")")
+    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/299b6fbb/assemblies/features/framework/src/main/resources/resources/bin/karaf
----------------------------------------------------------------------
diff --git a/assemblies/features/framework/src/main/resources/resources/bin/karaf b/assemblies/features/framework/src/main/resources/resources/bin/karaf
index 9ca0a42..fcb873a 100755
--- a/assemblies/features/framework/src/main/resources/resources/bin/karaf
+++ b/assemblies/features/framework/src/main/resources/resources/bin/karaf
@@ -18,14 +18,14 @@
 
 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}")")
+    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