ultrabayd init.d script (was Re: [ltp] ultrabase x2 warm-docking?)

unlisted linux-thinkpad@www.bm-soft.com
22 Apr 2002 01:09:53 -0500


--=-6eGbvmceKN1/Fho/PURQ
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

On Fri, 2002-04-19 at 17:29, J Lentin wrote:
<snip>
> I've got a 770X with debian on it, and I've been playing with
> hotswapping in my ultrabay also- I hadn't got anywhere for ages, then I
> noticed a solution (almost) under my nose.

THANK YOU, THANK YOU, THANK YOU!

to repay you for enlightening me, here's an init.d script for ultrabayd
(on a debian testing/woody system with the package hdparm 4.5-1.2).  i
copied my ultrabayd and idectl scripts to /usr/local/sbin (adjusting the
references inside those scripts accordingly), created this init.d script
to start and stop the daemon, and made the appropriate symlinks in all
the rcX.d directories.

hotswapping the cdrom and floppy on my 770x has been frustrating,
finally driving me to using a desktop to read floppies and just sharing
the contents across the network.  i tried the process documented on
thomas hood's 600 website, but couldn't get it to work (though almost
all his other notes/suggestions for a 600/600x work on my 770x).  after
reading your post to the list, i tried ultrabayd and it works great.  no
more booting my desktop just to share floppies out to my thinkpad.

again, thanks!

--=-6eGbvmceKN1/Fho/PURQ
Content-Disposition: attachment; filename=ultrabay
Content-Transfer-Encoding: quoted-printable
Content-Type: text/x-sh; name=ultrabay; charset=ISO-8859-15

#! /bin/sh
#
# skeleton	example file to build /etc/init.d/ scripts.
#		This file should be used to construct scripts for /etc/init.d.
#
#		Written by Miquel van Smoorenburg <miquels@cistron.nl>.
#		Modified for Debian GNU/Linux
#		by Ian Murdock <imurdock@gnu.ai.mit.edu>.
#
# Version:	@(#)skeleton  1.8  03-Mar-1998  miquels@cistron.nl
#
# This file was automatically customized by me on Mon Apr 22 00:03:11 CDT 2=
002

PATH=3D/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

DAEMON=3D/usr/local/sbin/ultrabayd
NAME=3Dultrabay
DESC=3D"Ultrabay daemon"
PID=3D"/var/run/$NAME.pid"
ARGS=3D"-daemon < /dev/null > /dev/null 2> /dev/null"

test -f $DAEMON || exit 0

set -e

case "$1" in
  start)
	echo -n "Starting $DESC: "
	start-stop-daemon --start --quiet \
	    --background --make-pidfile --pidfile $PID \
	    --exec $DAEMON -- $ARGS
	echo "$NAME."
	;;
  stop)
	echo -n "Stopping $DESC: "
	start-stop-daemon --stop --quiet --oknodo --pidfile $PID --name `basename =
$DAEMON`
	echo "$NAME."
	;;
  #reload)
	#
	#	If the daemon can reload its config files on the fly
	#	for example by sending it SIGHUP, do it here.
	#
	#	If the daemon responds to changes in its config file
	#	directly anyway, make this a do-nothing entry.
	#
	# echo "Reloading $DESC configuration files."
	# start-stop-daemon --stop --signal 1 --quiet --pidfile \
	#	/var/run/$NAME.pid --exec $DAEMON
  #;;
  restart|force-reload)
	#
	#	If the "reload" option is implemented, move the "force-reload"
	#	option to the "reload" entry above. If not, "force-reload" is
	#	just the same as "restart".
	#
	echo -n "Restarting $DESC: "
	start-stop-daemon --stop --quiet --oknodo --pidfile $PID --name `basename =
$DAEMON`
	sleep 1
	start-stop-daemon --start --quiet \
	    --background --make-pidfile --pidfile $PID \
	    --exec $DAEMON -- $ARGS
	echo "$NAME."
	;;
  *)
	# echo "Usage: /etc/init.d/$NAME {start|stop|restart|reload|force-reload}"=
 >&2
	echo "Usage: /etc/init.d/$NAME {start|stop|restart|force-reload}" >&2
	exit 1
	;;
esac

exit 0

--=-6eGbvmceKN1/Fho/PURQ--


----- The Linux ThinkPad mailing list -----
The linux-thinkpad mailing list home page is at:
http://www.bm-soft.com/~bm/tp_mailing.html