home *** CD-ROM | disk | FTP | other *** search
- #!/bin/sh
- #
- # Sun Microsystems Daemon Start Script
- # (c) 1998, Sun Microsystems, Inc.
-
- #set -x
-
- cd "`dirname "$0"`"
- current_dir=`pwd`
- current_base=`basename "$0"`
-
- sd_binary=$current_base.bin
- sd_platform=`uname -s`
-
-
- # set search path for shared libraries
- case $sd_platform in
- SunOS)
- LD_LIBRARY_PATH=$current_dir:.:$LD_LIBRARY_PATH
- export LD_LIBRARY_PATH
- ;;
- IRIX)
- LD_LIBRARYN32_PATH=$current_dir:.:$LD_LIBRARY_PATH
- export LD_LIBRARYN32_PATH
- ;;
- *)
- LD_LIBRARY_PATH=$current_dir:.:$LD_LIBRARY_PATH
- export LD_LIBRARY_PATH
- ;;
- esac
-
- #parse command line options
- dollar_null="${current_dir}"/${current_base}
- OTHER_ARGS=
-
- while [ $# -gt 0 ]; do
- case "$1" in
- -install)
- exec "$current_dir/$sd_binary" -i "$dollar_null"
- ;;
- -i)
- exec "$current_dir/$sd_binary" -i "$dollar_null"
- ;;
- -uninstall)
- exec "$current_dir/$sd_binary" -u "$dollar_null"
- ;;
- -u)
- exec "$current_dir/$sd_binary" -u "$dollar_null"
- ;;
- *)
- OTHER_ARGS="$OTHER_ARGS $1"
- ;;
- esac
- shift
- done
-
- # execute binary
- exec "$current_dir/$sd_binary" $OTHER_ARGS
-