Mercurial > noffle
comparison debian/init @ 469:0c7220ddf348 noffle
[svn] fixed output and return code
| author | godisch |
|---|---|
| date | Sun, 31 Aug 2003 16:16:28 +0100 |
| parents | fb4e5f59f4a7 |
| children |
comparison
equal
deleted
inserted
replaced
| 468:84c15e2195b5 | 469:0c7220ddf348 |
|---|---|
| 1 #!/bin/sh | 1 #!/bin/sh |
| 2 # $Id: init 595 2003-06-25 16:36:44Z godisch $ | 2 # $Id: init 615 2003-08-31 15:16:28Z godisch $ |
| 3 | 3 |
| 4 set -e | 4 set -e |
| 5 | 5 |
| 6 PATH="/bin:/usr/bin:/sbin:/usr/sbin" | 6 PATH="/bin:/usr/bin:/sbin:/usr/sbin" |
| 7 NOFFLE="/usr/bin/noffle" | 7 NOFFLE="/usr/bin/noffle" |
| 9 help () { | 9 help () { |
| 10 echo "Usage: /etc/init.d/noffle { online | offline }" >&2 | 10 echo "Usage: /etc/init.d/noffle { online | offline }" >&2 |
| 11 } | 11 } |
| 12 | 12 |
| 13 if [ ! -x "$NOFFLE" ]; then | 13 if [ ! -x "$NOFFLE" ]; then |
| 14 echo "Cannot execute noffle: program not found." >&2 | 14 # echo "Cannot execute noffle: program not found." >&2 |
| 15 exit 5 # LSB: program is not installed | 15 # exit 5 # LSB: program is not installed |
| 16 exit 0 # Debian policy: exit quietly, see #206928 | |
| 16 fi | 17 fi |
| 17 | 18 |
| 18 if [ "$2" ]; then | 19 if [ "$2" ]; then |
| 19 help | 20 help |
| 20 exit 2 # LSB: invalid or excess argument(s) | 21 exit 2 # LSB: invalid or excess argument(s) |
| 60 echo "Done." | 61 echo "Done." |
| 61 ;; | 62 ;; |
| 62 *) | 63 *) |
| 63 help | 64 help |
| 64 exit 2 # LSB: invalid or excess argument(s) | 65 exit 2 # LSB: invalid or excess argument(s) |
| 65 ;; | |
| 66 esac | 66 esac |
| 67 | 67 |
| 68 exit 0 | 68 exit 0 |
