TIP: Click on subject to list as thread! ANSI
echo: elebbs_support
to: All
from: Drew Baker
date: 2007-01-07 17:01:26
subject: Re: EleBBS: Linux Ele Now

* EleBBS Support List

DOSEMU.

I use a complicated script to handle all the passoffs from one program
to the other. Script central basicaly.


Here are a few scripts and batch files to get you pushed in right direction.


---START FILE EXECUTE.SH---

#!/bin/sh
##execute.sh version 1.34  7_21_06
##See bottom of script for change logs.

#Define the locations of your files DO NOT INCLUDE TRAILING SLASH /
clear
NODEDIR=/home/bbs/node
BBSDIR=/home/bbs
SCRIPTDIR=/home/bbs/dos_scripts
DOSEMUDIR=/home/bbs/dosemu/freedos
SUBDIR=/home/bbs/subhome

clear

if [ "$4" == "" ]
	then
	echo "Configured as"
	echo "nodedir="$NODEDIR
	echo "bbsdir="$BBSDIR
	echo "scriptdir="$SCRIPTDIR
	echo "dosemudir="$DOSEMUDIR
	echo "subdir="$SUBDIR
	echo ""
	echo "No commands passed to execute.sh. Please read Required Variables"
	echo ""
	echo "format   execute.sh node% user% execute% mode%"
	echo "example  execute.sh 1 drewbaker TW2002 DOSEMU"
	echo ""
	echo "Will run script TW2002 in DOSEMU as user drewbaker on node 1"
	sleep 3
	exit

fi

#Sets Terminal display to be compatable with industry standards. If user is
#running native linux applications and connecting via SSH this will have no
#effect. Display will be set to terminal on client side.
stty columns 80 line 25


#VARIABLES REQUIRED TO BE PASSED
#execute.sh NODE% USER% EXECUTE% MODE%
# NODE = BBS NODE Number If not needed place a '1' here
# USER = USER, this is the full account name on BBS. Used in handling
home directory and drop file creation
# EXECUTE = Bash script to execute after script converts users. OR
DOSLAUNCH Variable to pass onto emulator
# MODE = What mode to operate in. Valid modes
#	NATIVE = No special changes needed. Linux file may be launched
without specifying home
#	HOMDIR = Creates, manages and uses virtual home directory
#	TARDIR = Same as HOMDIR, only stores files in compress tarball,
Usefull for large homedir's
#	DOSEMU = Pass and launch clasic dos application.
#	DOSSRV = Pass and launch clasic dos application as background
service (tradewar alien AI engine).
#	DOSDUM = Pass and launch in dumb terminal dos. (linux shell remains
loaded while dos executes in background)
#	DOSPAS = Pass and launch in dos. (no door,node, user info is passed)
All scripts and batch files much be handled internaly in dosemu,
example would be to run nightly events like tradewars extern

clear
#remove reset if display gets messed up when returning to bbs.
#reset

echo "Launcher for Non-Multi-Node Doors Version 1.34 By Andrew Baker
BBS.DOTELTECH.COM"
echo "Loading Personalized Home Directory for $2 on Node $1 running $3"
echo ""
echo ""
sleep 1

if [ -d "$SUBDIR/$2" ]
	then
		echo "The Sub home directory $2 Exists"

	else
		echo "The Sub home directory $2 does not exist. Either this is your
first visit to StarDoc 134 doors, or you have not visited the doors
within 90 days. A New account will be created for you."
					echo "Creating your home"
					mkdir $SUBDIR/$2
					sleep 2
fi	

if [ "$4" == "SHOWHOME" ]
	then
		echo "Press Q to quit"
		ls -C $SUBDIR/$2 | less
		echo ""
		echo "Please wait"
		sleep 2
fi

if [ "$4" == "HOMDIR" ]
	then
	USER=$2_STARDOC134
	HOME=$SUBDIR/$2
	echo "Restoring Files (this may take a moment)"
	cp $SUBDIR/$2/* $NODEDIR$1/
	$SCRIPTDIR/$3
	echo "Backing up your files"
	cp $NODEDIR$1/* $SUBDIR/$2/
	rm $SUBDIR/$2/*.sys 2> /dev/null
	rm $SUBDIR/$2/*.def 2> /dev/null
	#rm $SUBDIR/$2/*.bbs 2> /dev/null
	rm $SUBDIR/$2/*.jdt 2> /dev/null
	rm $SUBDIR/$2/*.jdx 2> /dev/null
	rm $SUBDIR/$2/*.jhr 2> /dev/null
	rm $SUBDIR/$2/*.jlr 2> /dev/null
	rm $SUBDIR/$2/*.jir 2> /dev/null
	rm $NODEDIR$1/* 2>/dev/null
	cp $SUBDIR/$2/exitinfo.bbs $NODEDIR$1/exitinfo.bbs 2> /dev/null
	HOME=$BBSDIR
	USER=BBS
fi


if [ "$4" == "TARDIR" ]
	then
	echo "NOT DEVELOPED YET, USE HOMDIR FOR NOW"
fi

if [ "$4" == "NATIVE" ]	
	then
	$SCRIPTDIR/$3 $1 $2
fi


if [ "$4" == "DOSEMU" ]
	then

	#script assumes bbs is located in $BBSDIR  you will need to adjust scripts if
	#located elseware.
	#reset users terminal for 80x25, this will pervent dosemu from crashing,
	#or causing problems
	stty columns 80 line 25

	#Display a wait screen for user. When bbs us under high load, dosemu may take
	#20-30 seconds to load
	echo "Please Wait.  System is loading Legacy emulators. This may take
a minute"

	#copies node information to the dosemu enviornment. The C drive in dos
	cp $NODEDIR$1/ $DOSEMUDIR/ -R

	#This creates a files that will be excecuted in the autoexec within
the dos box enviornment
	#I know it says tradewars that was just my first program to get
running. The variables
	#apply to all programs. Door is important it is what tells the
emulated autoexec.bat to load program.
	echo "Rem TradeWars 2002 Operating Transfer Config" >
$DOSEMUDIR/lovar.bat
	echo "SET NODE="$1 >> $DOSEMUDIR/lovar.bat
	echo "SET TWUSER="$2 >> $DOSEMUDIR/lovar.bat
	echo "SET DOOR="$3 >> $DOSEMUDIR/lovar.bat

	#launches dosemu. Notice that there are no variables passed directly to dos emu
	#all variables needed are stored in the above echo.
	dosemu

	#Cleans up temporary files used durring door usage after dosemu exits
	rm $DOSEMUDIR/node$1 -R

	#In some cases extream coruption in display may happen. Uncomment 1
or both lines below. This may help
	#or hinder your problem.
	#Resets display
	#reset -m network:vt100

fi



if [ "$4" == "DOSDUM" ]
	then
	echo "Rem TradeWars 2002 Operating Transfer Config" >
$DOSEMUDIR/lovar.bat
	echo "Rem SET TWNODE="$1 >> $DOSEMUDIR/lovar.bat
	echo "SET TWUSER="$2 >> $DOSEMUDIR/lovar.bat
	echo "SET DOOR="$3 >> $DOSEMUDIR/lovar.bat
	dosemu -d $3
fi



if [ "$4" == "DOSPAS" ]
	then
	dosemu $3
fi




#CHANGE LOG
#v1.34
#
#Fixed error were home data of two users would be confused if more then
#one user used same program. User 1 loads program1, user 2 logs on and
#also uses program1. user 2 logs off, his data is saved, however when user 1
#quits, he would get user 2s data.
#
#v1.33
#Fixed glitch that caused some games to misread unix formated text files
#
#v1.32
#Added comments to popular sections
#
#v1.31
#Cleanup un-needed code
#
#v1.30
#Added variables to allow porting to other bbs's
#
#v1.20
#Official release to public.
#v1.0+
#private script for own use.





On 1/7/07, Scott Little  wrote:
> * EleBBS Support List
>
> >>> What programs can i use on Linux to setup Fido, Etc?
> >>> Mailer
> >> binkd: http://2f.ru/binkd/
> > Which one do i need to dwonload to compile for Linux, tried bink098.zip
> > and no makefile.
>
> Read the "!README" file.
>
>
> _______________________________________________________________
>
> To unsubscribe write to "listbot{at}thebbs.org" and put the words
> "unsubscribe elebbs{at}thebbs.org" in the SUBJECT of the message.
> _______________________________________________________________
>

---END EXECUTE.SH FILE -----

---START AUTOEXEC.BAT ---- EMULATED AUTOEXEC.BAT IN DOSEMU

{at}echo off

cls



path c:\bin;c:\gnu;c:\dosemu

set HELPPATH=c:\help

set TEMP=c:\tmp

rem set BLASTER=A220 I5 D1 H5 T6

prompt $P$G

unix -s DOSDRIVE_D

if "%DOSDRIVE_D%" == "" goto nodrived

lredir d: linux\fs%DOSDRIVE_D%

:nodrived

rem uncomment to load another bitmap font

rem loadhi display con=(vga,437,2)

rem mode con codepage prepare=((850) c:\cpi\ega.cpx)

rem mode con codepage select 850

rem chcp 850

rem uncomment the following to load cdrom support

rem shsucdx /d:mscd0001

rem unix -s DOSEMU_VERSION

rem echo "Welcome to dosemu %DOSEMU_VERSION%!"

unix -e

call lovar.bat

fossil

set

rem Rebuild config files to dos LFCR

cd\node%node%\

cat door.sys > door.tmp

cat dorinfo1.def > dorinfo1.tmp

cat door32.sys > door32.tmp

copy door.tmp door.sys /y

copy dorinfo1.tmp dorinfo1.def /y

copy door32.tmp door32.sys /y

cd\





if "%DOOR%"=="TW2002" goto TW2002

if "%DOOR%"=="TW2002N" goto TW2002N

if "%DOOR%"=="SHELL" goto SHELL

if "%DOOR%"=="LORD" goto LORD

if "%DOOR%"=="TWEXT" goto TWEXT

if "%DOOR%"=="TWEXTN" goto TWEXTN

if "%DOOR%"=="TWEDIT" goto TWEDIT

if "%DOOR%"=="TWEDITN" goto TWEDITN

if "%DOOR%"=="ANSIDUDE" goto ANSIDUDE

if "%DOOR%"=="CODE" goto CODE

if "%DOOR%"=="KROZ" goto KROZ

if "%DOOR%"=="MAZE" goto MAZE

if "%DOOR%"=="KNK" goto KNK

if "%DOOR%"=="CRUX" goto CRUX

if "%DOOR%"=="ZZT" goto ZZT

if "%DOOR%"=="HELICO" goto HELICO







echo End

exitemu





:TW2002

tw2002.bat

goto END



:TW2002N

tw2002n.bat

goto END



:LORD

lord.bat

goto END





:SHELL

goto fakeend



:TWEXT

twext.bat

goto END



:TWEXTN

twextn.bat

goto END



:TWEDIT

twedit.bat

goto END



:TWEDITN

tweditn.bat

goto END



:KNK

knk.bat

goto END



:ANSIDUDE

ansidude.bat

goto END



:CODE

code.bat

goto END



:KROZ

kroz.bat

goto END



:MAZE

maze.bat

goto END



:CRUX

crux.bat

goto END



:ZZT

zzt.bat

goto END



:HELICO

helico.bat

goto END





:END

exitemu



:FAKEEND

Echo Welcome to Shell





-----END AUTOEXEC.BAT FILE ----


Hopefully this will at least get you started in right direction.









-- 
"What's the use of a good quotation if you can't change it?"
  - Doctor Who

Open Source Software, Not only a way of life, but a tasty desert as
well.  http://www.fosug.org

Bring back the days of the BBS:  Telnet/SSH2:/doteltech.com
_______________________________________________________________


--- Internet Rex 2.29
* Origin: The gateway at The Snake (2:280/4312.101)
SEEN-BY: 633/267 270
@PATH: 280/4312 774/605 123/500 379/1 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.