Added installation support for Gentoo

This commit is contained in:
Michiel Broek 2003-11-10 19:06:32 +00:00
parent 86bd7c8e20
commit f358cb72c8
5 changed files with 105 additions and 13 deletions

View File

@ -15,6 +15,8 @@ v0.39.1 22-Oct-2003
/etc/inetd.conf or /etc/xinetd.d/mbsebbs or /etc/xinetd.conf.
Also check mbsetup 1.14.3 and remove any ITN flag in there.
Updated all documentation to validate html makeup.
Added installation support for Gentoo Linux, contributed by
Capitán X.
upgrade:
If you don't have any personal archivers, then remove
@ -52,6 +54,9 @@ v0.39.1 22-Oct-2003
mbtask:
Removed support for ITN.
script:
Added install scripts for Gentoo.
v0.39.0 09-Oct-2003 - 22-Oct-2003

View File

@ -100,7 +100,12 @@ if [ "$OSTYPE" = "Linux" ]; then
DISTNAME="Slackware"
DISTVERS="Old"
else
DISTNAME="Unknown"
if [ -f /etc/gentoo-release ]; then
DISTNAME="Gentoo"
DISTVERS=`cat /etc/gentoo-release | awk '{ print $5 }'`
else
DISTNAME="Unknown"
fi
fi
fi
fi

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 hatch editor.in bbsjoerc bbsjmacsrc
init.Slackware init.SuSE init.Gentoo hatch editor.in bbsjoerc bbsjmacsrc
####################################################################################################

60
script/init.Gentoo Normal file
View File

@ -0,0 +1,60 @@
#!/sbin/runscript
#
# $Id$
#
# description: Starts and stops the MBSE BBS.
#
# For Gentoo GNU/Linux (by Capitán X).
# Find the MBSE_ROOT from the /etc/passwd file.
MBSE_ROOT=`cat /etc/passwd | grep mbse: | awk -F ':' '{ print $6}'`
if [ "$MBSE_ROOT" = "" ]; then
echo "MBSE BBS: No 'mbse' user in the password file."
exit 1
fi
if [ ! -d $MBSE_ROOT ]; then
echo "MBSE BBS: Home directory '$MBSE_ROOT' not found."
exit 1
fi
PATH=/sbin:/bin:/usr/sbin:/usr/bin:$MBSE_ROOT/bin
DAEMON=$MBSE_ROOT/bin/mbtask
NAME=mbsebbs
DESC="MBSE BBS"
export MBSE_ROOT
depend() {
need localmount
}
start() {
ebegin "Starting mbse"
rm -f $MBSE_ROOT/sema/*
rm -f $MBSE_ROOT/var/*.LCK
rm -f $MBSE_ROOT/tmp/mb*
su mbse -c '$MBSE_ROOT/bin/mbtask' >/dev/null
echo -n "mbtask "
sleep 2
if [ -f $MBSE_ROOT/etc/config.data ]; then
su mbse -c '$MBSE_ROOT/bin/mbstat open -quiet'
echo -n "opened "
fi
eend $? "Loading error."
}
stop() {
ebegin "Stopping mbse"
if [ -f $MBSE_ROOT/etc/config.data ]; then
echo -n "logoff users "
su mbse -c '$MBSE_ROOT/bin/mbstat close wait -quiet' >/dev/null
fi
kill `pidof mbtask`
eend $? "Stopping error."
}

View File

@ -108,15 +108,20 @@ if [ "$OSTYPE" = "Linux" ]; then
DISTNAME="Slackware"
DISTVERS="Old"
else
DISTNAME="Unknown"
log "!" "unknown distribution, collecting data"
log "-" "`uname -a`"
log "-" "`ls -la /etc`"
echo "Failed to install bootscripts, unknown Linux distribution."
echo "Please mail the file `pwd`/script/installinit.log to mbroek@users.sourceforge.net"
echo "or send it as file attach to Michiel Broek at 2:280/2802@Fidonet."
echo "Add information about the distribution you use in the message."
exit 1;
if [ -f /etc/gentoo-release ]; then
DISTNAME="Gentoo"
DISTVERS=`cat /etc/gentoo-release | awk '{ print $5 }'`
else
DISTNAME="Unknown"
log "!" "unknown distribution, collecting data"
log "-" "`uname -a`"
log "-" "`ls -la /etc`"
echo "Failed to install bootscripts, unknown Linux distribution."
echo "Please mail the file `pwd`/script/installinit.log to mbroek@users.sourceforge.net"
echo "or send it as file attach to Michiel Broek at 2:280/2802@Fidonet."
echo "Add information about the distribution you use in the message."
exit 1;
fi
fi
fi
fi
@ -206,8 +211,8 @@ if [ "$DISTNAME" = "Slackware" ]; then
chmod 744 $MBSE_ROOT/etc/rc $MBSE_ROOT/etc/rc.shutdown
else
DISTINIT="/etc/rc.d/init.d/mbsed"
echo "Adding SystemV Slackware MBSE BBS start/stop scripts"
log "+" "Adding SystemV Slackware MBSE BBS start/stop scripts"
echo "Adding SystemV Slackware $DISTVERS MBSE BBS start/stop scripts"
log "+" "Adding SystemV Slackware $DISTVERS MBSE BBS start/stop scripts"
checkrcdir
cp init.Slackware $DISTINIT
chmod 755 $DISTINIT
@ -314,6 +319,23 @@ if [ "$DISTNAME" = "Debian" ]; then
fi
#-------------------------------------------------------------------------
#
# Adding scripts for Gentoo
#
#
if [ "$DISTNAME" = "Gentoo" ]; then
echo "You are running Gentoo Linux $DISTVERS"
log "+" "Adding Gentoo init script"
DISTINIT="/etc/init.d/mbsebbs"
cp init.Gentoo $DISTINIT
chmod 755 $DISTINIT
update-rc mbsebbs defaults
echo "Gentoo install ready."
log "+" "Gentoo init script installed"
fi
#--------------------------------------------------------------------------
#
# Adding scripts for NetBSD