diff --git a/script/Makefile.am b/script/Makefile.am index 563a29bd..d4157cd6 100644 --- a/script/Makefile.am +++ b/script/Makefile.am @@ -23,10 +23,10 @@ install-exec-local: echo "$(INSTALL) -o @OWNER@ -g @GROUP@ -m 0711 monthly $(sysconfdir)" ; \ fi $(INSTALL) -o @OWNER@ -g @GROUP@ -m 0755 bbsdoor.sh $(bindir) - $(INSTALL) -o @OWNER@ -g @GROUP@ -m 0755 mem $(bindir) + $(INSTALL) -o @OWNER@ -g @GROUP@ -m 0755 rundoor.sh $(bindir) @bash ./installinit.sh EXTRA_DIST = README maint midnight weekly monthly installinit.sh rc rc.shutdown \ -mbse.start mbse.stop bbsdoor.sh mem +mbse.start mbse.stop bbsdoor.sh rundoor.sh diff --git a/script/Makefile.in b/script/Makefile.in index 46966842..f5a7c770 100644 --- a/script/Makefile.in +++ b/script/Makefile.in @@ -74,7 +74,7 @@ VERSION = @VERSION@ SUBDIRS = . -EXTRA_DIST = README maint midnight weekly monthly installinit.sh rc rc.shutdown mbse.start mbse.stop bbsdoor.sh mem +EXTRA_DIST = README maint midnight weekly monthly installinit.sh rc rc.shutdown mbse.start mbse.stop bbsdoor.sh rundoor.sh mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = ../config.h @@ -306,7 +306,7 @@ install-exec-local: echo "$(INSTALL) -o @OWNER@ -g @GROUP@ -m 0711 monthly $(sysconfdir)" ; \ fi $(INSTALL) -o @OWNER@ -g @GROUP@ -m 0755 bbsdoor.sh $(bindir) - $(INSTALL) -o @OWNER@ -g @GROUP@ -m 0755 mem $(bindir) + $(INSTALL) -o @OWNER@ -g @GROUP@ -m 0755 rundoor.sh $(bindir) @bash ./installinit.sh # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/script/bbsdoor.sh b/script/bbsdoor.sh new file mode 100644 index 00000000..8b1c9138 --- /dev/null +++ b/script/bbsdoor.sh @@ -0,0 +1,20 @@ +#!/bin/sh +# +# Initialize DOS environment before starting a bbs door. +# +# by Redy Rodriguez, 21-Oct-2001 + +if [ "$1" != "" ]; then + if [ "$2" != "" ]; then + mkdir -p /dos/c/doors/node$2 >/dev/null 2>&1 + # Copy door.sys to dos partition + cat ~/door.sys >/dos/c/doors/node$2/door.sys + # Create .dosemu/disclaimer in user home to avoid warning + if [ ! -d ~/.dosemu ]; then + mkdir ~/.dosemu + fi + if [ ! -f ~/.dosemu/disclaimer ]; then + touch ~/.dosmenu/disclaimer + fi + fi +fi diff --git a/script/rundoor.sh b/script/rundoor.sh new file mode 100644 index 00000000..6a6427ac --- /dev/null +++ b/script/rundoor.sh @@ -0,0 +1,20 @@ +#!/bin/bash +# +# rundoor.sh - Never call this script directly, create a symlink +# to this file with the name of the door. For example +# tu run the door ilord do: +# cd /opt/mbse/bin +# ln -s rundoor.sh ilord +# +# by Redy Rodriguez and Michiel Broek. +# +DOOR=`basename $0` +COMMANDO="\"door $DOOR $*\r\"" + +/usr/bin/sudo /opt/mbse/bin/bbsdoor.sh $DOOR $1 +/usr/bin/sudo /opt/dosemu/bin/dosemu.bin \ + -F /var/lib/dosemu/global.conf \ + -I "`echo -e serial { com 1 virtual }"\n" keystroke $COMMANDO`" +reset +tput reset +stty sane