Author: jbonofre
Date: Sun Sep 15 15:42:08 2013
New Revision: 1523444
URL: http://svn.apache.org/r1523444
Log:
[KARAF-2471] Service wrapper now returns a correct exit code when using
RUN_AS_USER
Modified:
karaf/trunk/wrapper/core/src/main/resources/org/apache/karaf/wrapper/internal/unix/karaf-service
Modified:
karaf/trunk/wrapper/core/src/main/resources/org/apache/karaf/wrapper/internal/unix/karaf-service
URL:
http://svn.apache.org/viewvc/karaf/trunk/wrapper/core/src/main/resources/org/apache/karaf/wrapper/internal/unix/karaf-service?rev=1523444&r1=1523443&r2=1523444&view=diff
==============================================================================
---
karaf/trunk/wrapper/core/src/main/resources/org/apache/karaf/wrapper/internal/unix/karaf-service
(original)
+++
karaf/trunk/wrapper/core/src/main/resources/org/apache/karaf/wrapper/internal/unix/karaf-service
Sun Sep 15 15:42:08 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 $RESTVAL
fi
}