You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@karaf.apache.org by jb...@apache.org on 2013/09/15 17:53:10 UTC

svn commit: r1523446 - /karaf/branches/karaf-2.x/shell/wrapper/src/main/resources/org/apache/karaf/shell/wrapper/unix/karaf-service

Author: jbonofre
Date: Sun Sep 15 15:53:10 2013
New Revision: 1523446

URL: http://svn.apache.org/r1523446
Log:
[KARAF-2471] Service wrapper now returns a correct exit code when using RUN_AS_USER

Modified:
    karaf/branches/karaf-2.x/shell/wrapper/src/main/resources/org/apache/karaf/shell/wrapper/unix/karaf-service

Modified: karaf/branches/karaf-2.x/shell/wrapper/src/main/resources/org/apache/karaf/shell/wrapper/unix/karaf-service
URL: http://svn.apache.org/viewvc/karaf/branches/karaf-2.x/shell/wrapper/src/main/resources/org/apache/karaf/shell/wrapper/unix/karaf-service?rev=1523446&r1=1523445&r2=1523446&view=diff
==============================================================================
--- karaf/branches/karaf-2.x/shell/wrapper/src/main/resources/org/apache/karaf/shell/wrapper/unix/karaf-service (original)
+++ karaf/branches/karaf-2.x/shell/wrapper/src/main/resources/org/apache/karaf/shell/wrapper/unix/karaf-service Sun Sep 15 15:53:10 2013
@@ -325,6 +325,7 @@ checkUser() {
         # Still want to change users, recurse.  This means that the user will only be
         #  prompted for a password once.
         su -m $RUN_AS_USER -s /bin/sh -c "$REALPATH $1"
+        RETVAL=$?
 
         # Now that we are the original user again, we may need to clean up the lock file.
         if [ "X$LOCKPROP" != "X" ]
@@ -340,7 +341,7 @@ checkUser() {
             fi
         fi
 
-        exit 0
+        exit RETVAL
     fi
 }