2001-10-22 18:54:15 +00:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
2002-03-16 14:54:21 +00:00
|
|
|
# $Id$
|
|
|
|
#
|
2001-10-22 18:54:15 +00:00
|
|
|
# Initialize DOS environment before starting a bbs door.
|
2001-10-22 20:37:08 +00:00
|
|
|
# Parameters: $1 = name of the door
|
|
|
|
# $2 = the nodenumber for this session
|
2001-10-22 18:54:15 +00:00
|
|
|
#
|
2001-10-22 20:37:08 +00:00
|
|
|
# by Redy Rodriguez, 22-Oct-2001
|
2004-08-09 19:52:41 +00:00
|
|
|
# Revised for dosemu 1.2.0 by Michiel Broek.
|
2001-10-22 18:54:15 +00:00
|
|
|
|
2004-08-09 19:52:41 +00:00
|
|
|
DOSDRIVE=/opt/mbse/var/dosemu/c
|
2004-08-08 15:22:21 +00:00
|
|
|
|
2001-10-22 18:54:15 +00:00
|
|
|
if [ "$1" != "" ]; then
|
|
|
|
if [ "$2" != "" ]; then
|
2004-08-08 15:22:21 +00:00
|
|
|
mkdir -p $DOSDRIVE/doors/node$2 >/dev/null 2>&1
|
2001-10-22 18:54:15 +00:00
|
|
|
# Copy door.sys to dos partition
|
2004-08-08 15:22:21 +00:00
|
|
|
cat ~/door.sys >$DOSDRIVE/doors/node$2/door.sys
|
|
|
|
# Create .dosemu directory for the user.
|
2001-10-22 20:37:08 +00:00
|
|
|
if [ ! -d $HOME/.dosemu ]; then
|
|
|
|
mkdir $HOME/.dosemu
|
2001-10-22 18:54:15 +00:00
|
|
|
fi
|
2004-08-08 15:22:21 +00:00
|
|
|
# Looks cheap, see above, but this does an upgrade too
|
|
|
|
if [ ! -d $HOME/.dosemu/drives ]; then
|
|
|
|
mkdir $HOME/.dosemu/drives
|
|
|
|
fi
|
|
|
|
# Create .dosemu/disclaimer in user home to avoid warning
|
2001-10-22 20:37:08 +00:00
|
|
|
if [ ! -f $HOME/.dosemu/disclaimer ]; then
|
|
|
|
touch $HOME/.dosemu/disclaimer
|
2001-10-22 18:54:15 +00:00
|
|
|
fi
|
2004-08-08 15:22:21 +00:00
|
|
|
# For dosemu 1.2.0 and later, create a link to the drive
|
2004-08-09 21:30:30 +00:00
|
|
|
# if [ ! -f $HOME/.dosemu/drives/c ]; then
|
|
|
|
# ln -s $DOSDRIVE $HOME/.dosemu/drives
|
|
|
|
# fi
|
2001-10-22 18:54:15 +00:00
|
|
|
fi
|
|
|
|
fi
|