Permalink
Browse files

Making some LSB codes more explicit with variables

  • Loading branch information...
1 parent 0b9cf6d commit a082b153ac66d209da554cd30f8136a6c477d55e @sbisbee committed Sep 1, 2010
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/main/tools/etc/init.d/couchdb-lucene
@@ -13,6 +13,8 @@
SCRIPT_OK=0
SCRIPT_ERROR=1
+SCRIPT_ERROR_NOT_IMPLEMENTED=3
+SCRIPT_ERROR_NOT_INSTALLED=5
PATH=/sbin:/usr/sbin:/bin:/usr/bin
DESC="CouchDB Lucene index"
@@ -24,7 +26,7 @@ SCRIPTNAME=`basename $0`
LSB_LIBRARY=/lib/lsb/init-functions
# Exit if the package is not installed
-[ -x "$DAEMON" ] || exit $SCRIPT_ERROR
+[ -x "$DAEMON" ] || exit $SCRIPT_ERROR_NOT_INSTALLED
# Read configuration variable file if it is present
[ -r /etc/default/$NAME ] && . /etc/default/$NAME
@@ -123,7 +125,7 @@ case "$1" in
*)
echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
- exit 3
+ exit $SCRIPT_ERROR_NOT_IMPLEMENTED
;;
esac

0 comments on commit a082b15

Please sign in to comment.