aboutsummaryrefslogtreecommitdiffstats
path: root/todo/putback
diff options
context:
space:
mode:
Diffstat (limited to 'todo/putback')
-rw-r--r--todo/putback43
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
+