Skip to content

Instantly share code, notes, and snippets.

@JohnMorales
Created July 12, 2015 13:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JohnMorales/aa78405fa9acbf797c4d to your computer and use it in GitHub Desktop.
Save JohnMorales/aa78405fa9acbf797c4d to your computer and use it in GitHub Desktop.
#! /bin/sh
if test -z "${REAL_OPT_DIR}"; then
# next line to be replaced according to OPTWARE_TARGET
REAL_OPT_DIR=/volume1/@optware
fi
case "$1" in
start)
echo "Starting Optware."
if test -n "${REAL_OPT_DIR}"; then
if ! grep ' /opt ' /proc/mounts >/dev/null 2>&1 ; then
mkdir -p /opt
mount -o bind ${REAL_OPT_DIR} /opt
fi
fi
[ -x /opt/etc/rc.optware ] && /opt/etc/rc.optware
;;
reconfig)
true
;;
stop)
echo "Shutting down Optware."
true
;;
*)
echo "Usage: $0 {start|stop|reconfig}"
exit 1
esac
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment