karaf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (KARAF-5647) start, stop, shell, status and client fail on Solaris Sparc 11
Date Thu, 01 Mar 2018 03:17:00 GMT

    [ https://issues.apache.org/jira/browse/KARAF-5647?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16381451#comment-16381451
] 

ASF GitHub Bot commented on KARAF-5647:
---------------------------------------

jbonofre closed pull request #467: [KARAF-5647] start, stop, shell, status and client fail
on Solaris Sp…
URL: https://github.com/apache/karaf/pull/467
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

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 a1bd3ef3d3..7c00e01086 100755
--- a/assemblies/features/base/src/main/filtered-resources/resources/bin/client
+++ b/assemblies/features/base/src/main/filtered-resources/resources/bin/client
@@ -17,17 +17,32 @@
 #
 
 realpath() {
-  OURPWD=${PWD}
-  cd "$(dirname "${1}")" || exit 2
-  LINK=$(ls -l "$(basename "${1}")" | awk -F"-> " '{print $2}')
-  while [ "${LINK}" ]; do
-	  echo "link: ${LINK}" >&2
-    cd "$(dirname "${LINK}")" || exit 2
+  READLINK_EXISTS=$(command -v readlink &> /dev/null)
+  if [ -z $READLINK_EXISTS ]; then
+    OURPWD=${PWD}
+    cd "$(dirname "${1}")" || exit 2
     LINK=$(ls -l "$(basename "${1}")" | awk -F"-> " '{print $2}')
-  done
-  REALPATH="${PWD}/$(basename "${1}")"
-  cd "${OURPWD}" || exit 2
-  echo "${REALPATH}"
+    while [ "${LINK}" ]; do
+        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}" || exit 2
+    echo "${REALPATH}"
+  else
+    OURPWD=${PWD}
+    cd "$(dirname "${1}")" || exit 2
+    LINK=$(readlink "$(basename "${1}")")
+    while [ "${LINK}" ]; do
+	    echo "link: ${LINK}" >&2
+        cd "$(dirname "${LINK}")" || exit 2
+        LINK=$(readlink "$(basename "${1}")")
+    done
+    REALPATH="${PWD}/$(basename "${1}")"
+    cd "${OURPWD}" || exit 2
+    echo "${REALPATH}"
+  fi
 }
 
 REALNAME=$(realpath "$0")
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 8a5a85a516..e16a078175 100755
--- a/assemblies/features/base/src/main/filtered-resources/resources/bin/shell
+++ b/assemblies/features/base/src/main/filtered-resources/resources/bin/shell
@@ -17,17 +17,32 @@
 #
 
 realpath() {
-  OURPWD=${PWD}
-  cd "$(dirname "${1}")" || exit 2
-  LINK=$(ls -l "$(basename "${1}")" | awk -F"-> " '{print $2}')
-  while [ "${LINK}" ]; do
-	  echo "link: ${LINK}" >&2
-    cd "$(dirname "${LINK}")" || exit 2
+  READLINK_EXISTS=$(command -v readlink &> /dev/null)
+  if [ -z $READLINK_EXISTS ]; then
+    OURPWD=${PWD}
+    cd "$(dirname "${1}")" || exit 2
     LINK=$(ls -l "$(basename "${1}")" | awk -F"-> " '{print $2}')
-  done
-  REALPATH="${PWD}/$(basename "${1}")"
-  cd "${OURPWD}" || exit 2
-  echo "${REALPATH}"
+    while [ "${LINK}" ]; do
+        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}" || exit 2
+    echo "${REALPATH}"
+  else
+    OURPWD=${PWD}
+    cd "$(dirname "${1}")" || exit 2
+    LINK=$(readlink "$(basename "${1}")")
+    while [ "${LINK}" ]; do
+	    echo "link: ${LINK}" >&2
+        cd "$(dirname "${LINK}")" || exit 2
+        LINK=$(readlink "$(basename "${1}")")
+    done
+    REALPATH="${PWD}/$(basename "${1}")"
+    cd "${OURPWD}" || exit 2
+    echo "${REALPATH}"
+  fi
 }
 
 REALNAME=$(realpath "$0")
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 19fd11bbeb..9f2e4b1092 100755
--- a/assemblies/features/base/src/main/filtered-resources/resources/bin/start
+++ b/assemblies/features/base/src/main/filtered-resources/resources/bin/start
@@ -17,17 +17,32 @@
 #
 
 realpath() {
-  OURPWD=${PWD}
-  cd "$(dirname "${1}")" || exit 2
-  LINK=$(ls -l "$(basename "${1}")" | awk -F"-> " '{print $2}')
-  while [ "${LINK}" ]; do
-	  echo "link: ${LINK}" >&2
-    cd "$(dirname "${LINK}")" || exit 2
+  READLINK_EXISTS=$(command -v readlink &> /dev/null)
+  if [ -z $READLINK_EXISTS ]; then
+    OURPWD=${PWD}
+    cd "$(dirname "${1}")" || exit 2
     LINK=$(ls -l "$(basename "${1}")" | awk -F"-> " '{print $2}')
-  done
-  REALPATH="${PWD}/$(basename "${1}")"
-  cd "${OURPWD}" || exit 2
-  echo "${REALPATH}"
+    while [ "${LINK}" ]; do
+        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}" || exit 2
+    echo "${REALPATH}"
+  else
+    OURPWD=${PWD}
+    cd "$(dirname "${1}")" || exit 2
+    LINK=$(readlink "$(basename "${1}")")
+    while [ "${LINK}" ]; do
+	    echo "link: ${LINK}" >&2
+        cd "$(dirname "${LINK}")" || exit 2
+        LINK=$(readlink "$(basename "${1}")")
+    done
+    REALPATH="${PWD}/$(basename "${1}")"
+    cd "${OURPWD}" || exit 2
+    echo "${REALPATH}"
+  fi
 }
 
 REALNAME=$(realpath "$0")
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 778e0ad74b..c7c245d564 100755
--- a/assemblies/features/base/src/main/filtered-resources/resources/bin/status
+++ b/assemblies/features/base/src/main/filtered-resources/resources/bin/status
@@ -17,17 +17,32 @@
 #
 
 realpath() {
-  OURPWD=${PWD}
-  cd "$(dirname "${1}")" || exit 2
-  LINK=$(ls -l "$(basename "${1}")" | awk -F"-> " '{print $2}')
-  while [ "${LINK}" ]; do
-	  echo "link: ${LINK}" >&2
-    cd "$(dirname "${LINK}")" || exit 2
+  READLINK_EXISTS=$(command -v readlink &> /dev/null)
+  if [ -z $READLINK_EXISTS ]; then
+    OURPWD=${PWD}
+    cd "$(dirname "${1}")" || exit 2
     LINK=$(ls -l "$(basename "${1}")" | awk -F"-> " '{print $2}')
-  done
-  REALPATH="${PWD}/$(basename "${1}")"
-  cd "${OURPWD}" || exit 2
-  echo "${REALPATH}"
+    while [ "${LINK}" ]; do
+        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}" || exit 2
+    echo "${REALPATH}"
+  else
+    OURPWD=${PWD}
+    cd "$(dirname "${1}")" || exit 2
+    LINK=$(readlink "$(basename "${1}")")
+    while [ "${LINK}" ]; do
+	    echo "link: ${LINK}" >&2
+        cd "$(dirname "${LINK}")" || exit 2
+        LINK=$(readlink "$(basename "${1}")")
+    done
+    REALPATH="${PWD}/$(basename "${1}")"
+    cd "${OURPWD}" || exit 2
+    echo "${REALPATH}"
+  fi
 }
 
 REALNAME=$(realpath "$0")
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 93a1cc4f6b..db5835385f 100755
--- a/assemblies/features/base/src/main/filtered-resources/resources/bin/stop
+++ b/assemblies/features/base/src/main/filtered-resources/resources/bin/stop
@@ -17,17 +17,32 @@
 #
 
 realpath() {
-  OURPWD=${PWD}
-  cd "$(dirname "${1}")" || exit 2
-  LINK=$(ls -l "$(basename "${1}")" | awk -F"-> " '{print $2}')
-  while [ "${LINK}" ]; do
-	  echo "link: ${LINK}" >&2
-    cd "$(dirname "${LINK}")" || exit 2
+  READLINK_EXISTS=$(command -v readlink &> /dev/null)
+  if [ -z $READLINK_EXISTS ]; then
+    OURPWD=${PWD}
+    cd "$(dirname "${1}")" || exit 2
     LINK=$(ls -l "$(basename "${1}")" | awk -F"-> " '{print $2}')
-  done
-  REALPATH="${PWD}/$(basename "${1}")"
-  cd "${OURPWD}" || exit 2
-  echo "${REALPATH}"
+    while [ "${LINK}" ]; do
+        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}" || exit 2
+    echo "${REALPATH}"
+  else
+    OURPWD=${PWD}
+    cd "$(dirname "${1}")" || exit 2
+    LINK=$(readlink "$(basename "${1}")")
+    while [ "${LINK}" ]; do
+	    echo "link: ${LINK}" >&2
+        cd "$(dirname "${LINK}")" || exit 2
+        LINK=$(readlink "$(basename "${1}")")
+    done
+    REALPATH="${PWD}/$(basename "${1}")"
+    cd "${OURPWD}" || exit 2
+    echo "${REALPATH}"
+  fi
 }
 
 REALNAME=$(realpath "$0")


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> start, stop, shell, status and client fail on Solaris Sparc 11
> --------------------------------------------------------------
>
>                 Key: KARAF-5647
>                 URL: https://issues.apache.org/jira/browse/KARAF-5647
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf-shell
>            Reporter: Andrea Cosentino
>            Assignee: Andrea Cosentino
>            Priority: Minor
>             Fix For: 4.2.0, 4.1.6
>
>
> Actually we have exactly the same behavior as KARAF-4949



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message