Author: jbonofre
Date: Sun Sep 15 16:04:35 2013
New Revision: 1523449
URL: http://svn.apache.org/r1523449
Log:
[KARAF-2471] Service wrapper now returns a correct exit code when using
RUN_AS_USER
Modified:
karaf/branches/karaf-2.2.x/shell/wrapper/src/main/resources/org/apache/karaf/shell/wrapper/unix/karaf-service
Modified:
karaf/branches/karaf-2.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.2.x/shell/wrapper/src/main/resources/org/apache/karaf/shell/wrapper/unix/karaf-service?rev=1523449&r1=1523448&r2=1523449&view=diff
==============================================================================
---
karaf/branches/karaf-2.2.x/shell/wrapper/src/main/resources/org/apache/karaf/shell/wrapper/unix/karaf-service
(original)
+++
karaf/branches/karaf-2.2.x/shell/wrapper/src/main/resources/org/apache/karaf/shell/wrapper/unix/karaf-service
Sun Sep 15 16:04:35 2013
@@ -326,6 +326,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" ]
@@ -341,7 +342,7 @@ checkUser() {
fi
fi
- exit 0
+ exit $RETVAL
fi
}