Permalink
Browse files

retreive uid with id binary, because some shells like dash doesn't se…

…t $UID

(Debian bug #174546)
  • Loading branch information...
1 parent 52994d1 commit fb665ac3624b37ad6f5466617ab1433a08d80f0a @racke racke committed Sep 29, 2005
Showing with 3 additions and 0 deletions.
  1. +3 −0 debian/interchange.wrapper
@@ -8,6 +8,9 @@ fi
. /etc/interchange/init.cfg
OPTS="SocketFile=/var/run/interchange/interchange.sock IPCsocket=/var/run/interchange/interchange.sock.ipc PIDfile=/var/run/interchange/interchange.pid --pidfile=/var/run/interchange/interchange.pid --log=/var/log/interchange/error.log --rundir=/var/run/interchange"
CMD="env MINIVEND_STORABLE=$USE_STORABLE MINIVEND_FORCE_THREADS=1 /usr/lib/interchange/bin/interchange $OPTS $@"
+if [ "x$UID" = "x" ]; then
+ UID=`id -u`
+fi
if [ "$UID" -eq 0 ]; then
su -s /bin/sh -c "$CMD" $USER
else

0 comments on commit fb665ac

Please sign in to comment.