Skip to content

Commit

Permalink
Incorporate zephyr soname into BARNOWL_REAL for lenny/karmic.
Browse files Browse the repository at this point in the history
  • Loading branch information
davidben authored and nelhage committed Apr 26, 2010
1 parent a5fcd8b commit 0a13140
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions barnowl
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,24 @@ case $BARNOWL_REAL in
*) BARNOWL_REAL_PATH="$(athdir /mit/barnowl bin)/$BARNOWL_REAL" ;;
esac

# Detect zephyr name if necessary
if [ ! -x "$BARNOWL_REAL_PATH" ]; then
SUFFIX=
case $ATHENA_SYS in
*_deb50)
# Both Debian Lenny and Ubuntu Karmic use the _deb50
# sysname, but they have different zephyr versions (soname
# 3 and 4, respectively). So for that sysname, we the
# build script includes the zephyr soname into the binary
# name, and we pick the right one.
if /sbin/ldconfig -p | grep -qF "libzephyr.so.4"; then
SUFFIX=.zephyr4
else
SUFFIX=.zephyr3
fi
;;
esac
BARNOWL_REAL_PATH="$BARNOWL_REAL_PATH$SUFFIX"
fi

exec "$BARNOWL_REAL_PATH" "$@"

0 comments on commit 0a13140

Please sign in to comment.