Permalink
Browse files

Convert some bash-specific syntax to standard Bourne shell (RT #194).

  • Loading branch information...
1 parent caba107 commit 2cc3ec810d54777cb6196d0b89f56571cb8a83ff @jonjensen jonjensen committed May 13, 2008
Showing with 4 additions and 2 deletions.
  1. +2 −0 WHATSNEW-5.5
  2. +1 −1 debian/interchange.wrapper
  3. +1 −1 debian/makecat.wrapper
View
@@ -150,6 +150,8 @@ Packaging
deprecated, so make sure a copy is available here until we switch to a
different module.
+* Converted a few bashisms to standard Bourne shell compatibility (RT #194).
+
Extra tools
-----------
@@ -8,7 +8,7 @@ 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 [ "$UID" -eq 0 ]; then
+if [ "`/usr/bin/id -ru`" -eq 0 ]; then
su -s /bin/sh -c "$CMD" $USER
else
$CMD
View
@@ -4,7 +4,7 @@
OPTS="--interchangeuser=$USER --linkprogram=/usr/lib/cgi-bin/ic/vlink --documentroot=$DOCROOT --catalogconf=/etc/interchange/catalogs.cfg --serverconf=/etc/apache2/apache2.conf"
CMD="/usr/lib/interchange/bin/makecat $OPTS $@"
-if [ "$UID" -eq 0 ]; then
+if [ "`/usr/bin/id -ru`" -eq 0 ]; then
su -s /bin/sh -c "$CMD" $USER
else
OPTS="$OPTS --nocfg --norunning"

0 comments on commit 2cc3ec8

Please sign in to comment.