diff options
author | kraxel <kraxel> | 2005-02-09 12:01:53 +0000 |
---|---|---|
committer | kraxel <kraxel> | 2005-02-09 12:01:53 +0000 |
commit | e94be4b2a1c8504a615108f617881eaa7745961a (patch) | |
tree | 852f12c8b9124336fb3f77a51606e3d88ce50e70 /todo/putback | |
parent | b00ae68a83de451edb86a2bb3bbaa1a16021d199 (diff) | |
download | scsi-changer-e94be4b2a1c8504a615108f617881eaa7745961a.tar.gz |
Diffstat (limited to 'todo/putback')
-rw-r--r-- | todo/putback | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/todo/putback b/todo/putback new file mode 100644 index 0000000..00ec1e4 --- /dev/null +++ b/todo/putback @@ -0,0 +1,43 @@ +#! /bin/sh +# +# System stop script for putback +# +### BEGIN INIT INFO +# Provides: putback +# Default-Start: % +# Default-Stop: 3 5 +# Description: Puts back media from jukebox +### END INIT INFO + +# Source SuSE config +. /etc/rc.config + +# Determine the base and follow a runlevel link name. +base=${0##*/} +link=${base#*[SK][0-9][0-9]} + +# Force execution if not called by a runlevel directory. +test $link = $base && PUTBACK_MEDIA=yes +test "$PUTBACK_MEDIA" = yes || exit 0 + +PUTBACK_BIN=/usr/sbin/putback +test -x $FOO_BIN || exit 5 + +. /etc/rc.status + +# First reset status of this service +rc_reset + +case "$1" in + stop) + echo -n "Putting back media" + $PUTBACK_BIN + rc_status -v + ;; + *) + echo -n "Putback is only useful when shutting down" + rc_status -v + ;; +esac +rc_exit + |