From ab44488e4c53e9b2e7553923382201ad3807593e Mon Sep 17 00:00:00 2001 From: kytv <kytv@mail.i2p> Date: Fri, 13 Jun 2014 20:55:36 +0000 Subject: [PATCH] i2prouter: don't use uname -p to determine the arch - This came from the script from Tanuki but it does return useful information (as far as its use in the script) in my testing. uname -m is better for our needs. (The problem is only seen on certain CPUs when *all* available wrapper binaries are present and the script tries to resolve the correct binary to use.. --- debian/patches/0001-path-substitution.patch | 8 ++++---- installer/resources/i2prouter | 15 +++------------ 2 files changed, 7 insertions(+), 16 deletions(-) diff --git a/debian/patches/0001-path-substitution.patch b/debian/patches/0001-path-substitution.patch index d74954ae54..c298ac5c57 100644 --- a/debian/patches/0001-path-substitution.patch +++ b/debian/patches/0001-path-substitution.patch @@ -147,7 +147,7 @@ Debian wrapper.config to try to prevent confusion. if [ -n "$FIXED_COMMAND" ] then COMMAND="$FIXED_COMMAND" -@@ -1023,7 +947,6 @@ +@@ -1014,7 +938,6 @@ if [ "X$pid" = "X" ] then eval echo " `gettext 'WARNING: $APP_LONG_NAME may have failed to start.'`" @@ -155,7 +155,7 @@ Debian wrapper.config to try to prevent confusion. else eval echo ' running: PID:$pid' fi -@@ -1826,7 +1749,7 @@ +@@ -1817,7 +1740,7 @@ } showsetusermesg() { @@ -164,7 +164,7 @@ Debian wrapper.config to try to prevent confusion. } checkifstartingasroot() { -@@ -1834,7 +1757,7 @@ +@@ -1825,7 +1748,7 @@ echo "`gettext 'Running I2P as the root user is *not* recommended.'`" showsetusermesg echo @@ -173,7 +173,7 @@ Debian wrapper.config to try to prevent confusion. exit 1 fi } -@@ -1899,24 +1822,10 @@ +@@ -1890,24 +1813,10 @@ status ;; diff --git a/installer/resources/i2prouter b/installer/resources/i2prouter index a5c167f4eb..40181548a5 100644 --- a/installer/resources/i2prouter +++ b/installer/resources/i2prouter @@ -404,16 +404,7 @@ then APP_PLIST_BASE=${PLIST_DOMAIN}.${APP_NAME} APP_PLIST=${APP_PLIST_BASE}.plist else - DIST_ARCH= - DIST_ARCH=`uname -p 2>/dev/null | $TREXE "[A-Z]" "[a-z]" | $TREXE -d ' '` - if [ "X$DIST_ARCH" = "X" ] - then - DIST_ARCH="unknown" - fi - if [ "$DIST_ARCH" = "unknown" ] - then - DIST_ARCH=`uname -m 2>/dev/null | $TREXE "[A-Z]" "[a-z]" | $TREXE -d ' '` - fi + DIST_ARCH=`uname -m 2>/dev/null | $TREXE "[A-Z]" "[a-z]" | $TREXE -d ' '` case "$DIST_ARCH" in 'athlon' | 'i386' | 'i486' | 'i586' | 'i686') DIST_ARCH="x86" @@ -479,10 +470,10 @@ else DIST_BITS="64" ;; armv*) - if [ -z "`readelf -A /proc/self/exe | grep Tag_ABI_VFP_args`" ] ; then + if [ -z "`readelf -A /proc/self/exe | grep Tag_ABI_VFP_args`" ] ; then DIST_ARCH="armel" DIST_BITS="32" - else + else DIST_ARCH="armhf" DIST_BITS="32" fi -- GitLab