Added hatch script

This commit is contained in:
Michiel Broek 2002-02-23 20:28:36 +00:00
parent bc1f30a703
commit 62072daeac
4 changed files with 100 additions and 1 deletions

View File

@ -4658,3 +4658,6 @@ v0.33.20 10-Feb-2002
would kill that user because the last login date wasn't set.
It will use the registration date instead.
hatch:
A new shellscript to hatch files in a tic area.

4
TODO
View File

@ -57,6 +57,10 @@ mbfido:
N: Process GoldED filerequest netmails with the filereq flag set, we
should create a .req file with the contents of the subject line.
N: When hatch a file with a long filename, the outgoing ticfiles will
have a long uppercase filename and the file is transmitted with
a long filename. I think this should all be 8.3 names.
mbcico:
L: Implement modem connect response translation for ISDN lines, i.e.
make the CAUSE responses human readable. see McMail for this

View File

@ -5,7 +5,7 @@ include ../Makefile.global
OTHER = Makefile README maint midnight weekly monthly installinit.sh rc rc.shutdown \
mbse.start mbse.stop bbsdoor.sh rundoor.sh init.Debian init.RedHat \
init.Slackware init.SuSE
init.Slackware init.SuSE hatch
####################################################################################################
@ -34,6 +34,10 @@ install:
${INSTALL} -c -o ${OWNER} -g ${GROUP} -m 0711 monthly ${ETCDIR} ; \
echo "${INSTALL} -c -o ${OWNER} -g ${GROUP} -m 0711 monthly ${ETCDIR}" ; \
fi
@if [ ! -x ${BINDIR}/hatch ]; then \
${INSTALL} -c -o ${OWNER} -g ${GROUP} -m 0755 hatch ${BINDIR} ; \
echo "${INSTALL} -c -o ${OWNER} -g ${GROUP} -m 0755 hatch ${BINDIR}" ; \
fi
${INSTALL} -c -o ${OWNER} -g ${GROUP} -m 0755 bbsdoor.sh ${BINDIR}
${INSTALL} -c -o ${OWNER} -g ${GROUP} -m 0755 rundoor.sh ${BINDIR}
@bash ./installinit.sh

88
script/hatch Normal file
View File

@ -0,0 +1,88 @@
#!/bin/sh
#
# $Id$
#
# Hatch script for MBSE BBS.
#
#============================================================================
# Copyright (C) 1997-2002
#
# Michiel Broek FIDO: 2:280/2802
# Beekmansbos 10
# 1971 BV IJmuiden
# the Netherlands
#
# This file is part of MBSE BBS.
#
# This BBS is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 2, or (at your option) any
# later version.
#
# MBSE BBS is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with MBSE BBS; see the file COPYING. If not, write to the Free
# Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
#============================================================================
#
# Global settings, change as needed:
#
# Password, see menu 1.13.2
#
HATCHPWD="DizIzMyBIGseeKret"
INBOUND=$MBSE_ROOT/var/inbound
if [ "`id -un`" != "mbse" ]; then
echo "This program may only be used by user 'mbse'"
exit 1
fi
cat <<EOF
Hatch files for MBSE BBS. All files you want to hatch must be
in the current directory and must be owned by user 'mbse' and
group 'bbs'. They will be removed when they are hatched, so
this should be a temporary copy of all those files.
These files must be real files, no symlinks.
EOF
echo -n "Enter TIC group to hatch files in (Control-C = stop) "
read GROUP
echo -n "Enter the Fidonet aka for this TIC group, ie. 2:280/2802 "
read AKA
echo -e "Now scanning directory, add a oneline description for each file\n"
i=0;
for f in `ls`
do
if [ -f $f ]; then
echo -e "Enter description for $f (empty is skip file)"
echo -n ": "
read DESC
if [ ! -z "$DESC" ]; then
let i=i+1
FILE=$INBOUND/`$MBSE_ROOT/bin/mbseq`.tic
echo "Hatch" > $FILE
echo "Created MBSE BBS hatch script v1.0.0" >> $FILE
echo "Area $GROUP" >> $FILE
echo "Origin $AKA" >> $FILE
echo "From $AKA" >> $FILE
echo "Fullname $f" >> $FILE
echo "Pth `pwd`" >> $FILE
echo "Desc $DESC" >> $FILE
echo "Pw $HATCHPWD" >> $FILE
echo -e "\nFile hatched\n"
fi
fi
done
echo -e "\nTotal $i files hatched in area $GROUP."
echo "Start processing TIC files"
$MBSE_ROOT/bin/mbfido tic