#! /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