1
0
mirror of https://github.com/PDP-10/its.git synced 2026-01-13 15:27:28 +00:00
Lars Brinkhoff f77c78363e Properly quote name of started program.
So that a space in the name isn't mistaken for the start of the next
argument, which is the process ID to kill later.
2025-01-28 10:23:52 +01:00

61 lines
1018 B
Bash
Executable File

#!/bin/sh
#Defaults.
VT52=${VT52:--B -b 9600}
EXIT=:
trap "" QUIT INT TERM
started() {
EXIT="$EXIT;stop \"$1\" $2"
trap "$EXIT" EXIT
echo "$1 started, pid $2"
}
stop() {
echo -n "Stopping $1... "
kill "$2" 2> /dev/null
sleep 2
kill -9 "$2" 2> /dev/null
echo "OK"
}
gt40() {
(sleep 3; tools/simh/BIN/pdp11 build/simh/gt40 >gt40.log 2>&1) &
started GT40 "$!"
}
vt52() {
(sleep 2; tools/vt05/vt52 $VT52 telnet localhost 10018 >vt52.log 2>&1) &
started "VT52" "$!"
}
chaosnet() {
(sleep 2; tools/cbridge/cbridge -c build/cbridge.conf >cbridge.log 2>&1) &
started "Chaosnet bridge" "$!"
}
help() {
cat <<EOF
This start script takes several command line arguments:
help - Display this help text.
gt40 - Start a GT40 emulator.
vt52 - Start a VT52 emulator.
chaosnet - Start a local Chaosnet.
EOF
touch out/simh/nohelp
}
test -f out/simh/nohelp || help
while test -n "$1"; do
"$1"
shift
done
tools/simhv3/BIN/pdp10 build/simhv3/boot
exit 0