I would like to auto-run SimH VAX at startup in Ubuntu Linux 10.04. Is there a
way to make it a service I can (re)start as required? I will probably set the
output from the master console to an alternate console tty area in the config.
What's the best way to do this, I have no clue and a quick Google turns up very
little :)
I cannot comment on the best way to do it as I'm far from a Linux
expert, but I have an /etc/init.d script that I cobbled together (based
on a different one where I just copied-and-pasted the reference to
start-vax) on my Ubuntu system.
The attached vax.init.d goes in as /etc/init.d/vax and then linked to these:
/etc/rc1.d/K10vax
/etc/rc2.d/S91vax
/etc/rc3.d/S91vax
/etc/rc4.d/S91vax
/etc/rc5.d/S91vax
These might not be entirely correct. As I said, I just cobbled it
together. It does seem to work for my basic needs, though.
The start-vax script basically runs the vax binary inside screen so I
can attach to the console later on if I need.
Anyway, that's what I'm using. Feel free to take it and improve on it to
fit your needs. :-)
--Marc
#!/bin/sh
# Start/stop the VAX virtual guest
#
### BEGIN INIT INFO
# Provides: vax
# Required-Start:
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 1
# Short-Description: Virtual VAX (SIMH)
# Description: VAX is a virtual computer system running under a VAX
# emulator that is part of SIMH. This VAX host runs OpenVMS.
### END INIT INFO
test -f /vax/vax || exit 0
test -f /vax/vax.ini || exit 0
. /lib/lsb/init-functions
case "$1" in
start) log_daemon_msg "Starting VAX emulator" "vax"
start-stop-daemon --start --quiet --pidfile $PIDFILE --name vax
--startas /vax/start-vax -- $LSBNAMES
log_end_msg $?
;;
stop) log_daemon_msg "Stopping VAX emulator" "vax"
start-stop-daemon --stop --quiet --pidfile $PIDFILE --name vax
log_end_msg $?
;;
status)
status_of_proc -p $PIDFILE /vax/bin/vax vax && exit 0 || exit $?
;;
*) log_action_msg "Usage: /etc/init.d/cron {start|stop|status}"
exit 2
;;
esac
exit 0
#!/bin/sh
screen -d -m nice /vax/vax
_______________________________________________
Simh mailing list
[email protected]
http://mailman.trailing-edge.com/mailman/listinfo/simh