From f18670f3fe0f1255a68c559dec5da4cfd469e594 Mon Sep 17 00:00:00 2001 From: Michiel Broek Date: Sun, 13 Jan 2002 14:07:43 +0000 Subject: [PATCH] Updates for newer Linux distro's --- ChangeLog | 2 ++ Makefile | 3 ++ SETUP.sh | 72 +++++++++++++++++++++++++++++++++++++------ script/installinit.sh | 18 ++++++----- 4 files changed, 77 insertions(+), 18 deletions(-) diff --git a/ChangeLog b/ChangeLog index d142478b..0977a33a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4259,6 +4259,8 @@ v0.33.19 26-Oct-2001 SETUP.sh Better grep to check for excisting usernames like bbs, mbse. Ported to NetBSD. + Added support for xinetd configuration. + Changed distribution test for Mandrake. libcommon.a: When adding seenby entries, the zone number is copied from the diff --git a/Makefile b/Makefile index cdcd4f0c..46ace2b2 100644 --- a/Makefile +++ b/Makefile @@ -117,12 +117,15 @@ install: mkdir ${PREFIX}/ftp ; \ mkdir ${PREFIX}/ftp/pub ; \ mkdir ${PREFIX}/ftp/incoming ; \ + mkdir ${PREFIX}/ftp/local ; \ ${CHOWN} `id -un`.`id -gn` ${PREFIX}/ftp ; \ chmod 0755 ${PREFIX}/ftp ; \ ${CHOWN} ${OWNER}.${GROUP} ${PREFIX}/ftp/pub ; \ chmod 0755 ${PREFIX}/ftp/pub ; \ ${CHOWN} `id -un`.`id -gn` ${PREFIX}/ftp/incoming ; \ chmod 0755 ${PREFIX}/ftp/incoming ; \ + ${CHOWN} ${OWNER}.${GROUP} ${PREFIX}/ftp/local ; \ + chmod 0755 ${PREFIX}/ftp/local ; \ fi @if [ ! -d ${PREFIX}/var/bso ] ; then \ mkdir ${PREFIX}/var/nodelist ; \ diff --git a/SETUP.sh b/SETUP.sh index 7d95d958..b8ee9c41 100644 --- a/SETUP.sh +++ b/SETUP.sh @@ -81,14 +81,16 @@ if [ "$OSTYPE" = "Linux" ]; then DISTNAME="SuSE" DISTVERS=`cat /etc/SuSE-release | grep VERSION | awk '{ print $3 }'` else - if [ -f /etc/redhat-release ]; then - DISTNAME="RedHat" - DISTVERS=`cat /etc/redhat-release | awk '{ print $5 }'` - else - if [ -f /etc/mandrake-release ]; then - DISTNAME="Mandrake" - # Format: Linux Mandrake release 8.0 (Cooker) for i586 - DISTVERS=`cat /etc/mandrake-release | awk '{ print $4 }'` + # Mandrake test before RedHat, Mandrake has a redhat-release + # file also which is a symbolic link to mandrake-release. + if [ -f /etc/mandrake-release ]; then + DISTNAME="Mandrake" + # Format: Linux Mandrake release 8.0 (Cooker) for i586 + DISTVERS=`cat /etc/mandrake-release | awk '{ print $4 }'` + else + if [ -f /etc/redhat-release ]; then + DISTNAME="RedHat" + DISTVERS=`cat /etc/redhat-release | awk '{ print $5 }'` else if [ -f /etc/rc.d/rc.0 ] && [ -f /etc/rc.d/rc.local ]; then # If Slackware wasn't detected yet it is version 4.0 or older. @@ -312,7 +314,7 @@ if [ "$OSTYPE" = "Linux" ]; then if [ -f /etc/shadow ]; then log "+" "Standard shadow password system" # Not all systems are the same... - if [ "`grep -w bbs:\!\!: /etc/shadow`" != "" ]; then + if [ "`grep bbs:\!\!: /etc/shadow`" != "" ]; then sed /bbs:\!\!:/s/bbs:\!\!:/bbs::/ /etc/shadow >/etc/shadow.bbs else sed /bbs:\!:/s/bbs:\!:/bbs::/ /etc/shadow >/etc/shadow.bbs @@ -410,7 +412,9 @@ if [ "$FIDO" = "TRUE" ] || [ "$BINKD" = "TRUE" ]; then fi -if [ "`grep mbcico /etc/inetd.conf`" = "" ]; then +if [ -f /etc/inetd.conf ]; then + log "+" "/etc/inetd.conf found, inetd system" + if [ "`grep mbcico /etc/inetd.conf`" = "" ]; then echo -n "Modifying /etc/inetd.conf" log "+" "Modifying /etc/inetd.conf" mv /etc/inetd.conf /etc/inetd.conf.mbse @@ -432,8 +436,56 @@ EOF log "!" "Warning: no inetd.pid file found" fi echo ", done." + fi fi +if [ -f /etc/xinetd.conf ]; then + log "+" "/etc/xinetd.conf found, xinetd system" + if [ -d /etc/xinetd.d ]; then + log "+" "has xinetd.d subdir, writing files" + XINET="/etc/xinetd.d/mbsebbs" + else + log "+" "appending to xinetd.conf" + XINET="/etc/xinetd.conf" + fi +cat << EOF >> $XINET +#:MBSE BBS services are defined here. + +service binkp +{ + socket_type = stream + protocol = tcp + wait = no + user = mbse + instances = 10 + server = $MHOME/bin/mbcico + server-args = -t ibn +} + +service tfido +{ + socket_type = stream + protocol = tcp + wait = no + user = mbse + instances = 10 + server = $MHOME/bin/mbcico + server-args = -t itn +} + +service fido +{ + socket_type = stream + protocol = tcp + wait = no + user = mbse + instances = 10 + server = $MHOME/bin/mbcico + server-args = -t ifc +} +EOF + +fi echo "" echo -n "Press Enter to continue" diff --git a/script/installinit.sh b/script/installinit.sh index cf01f5eb..7ec92f30 100644 --- a/script/installinit.sh +++ b/script/installinit.sh @@ -88,14 +88,16 @@ if [ "$OSTYPE" = "Linux" ]; then DISTNAME="SuSE" DISTVERS=`cat /etc/SuSE-release | grep VERSION | awk '{ print $3 }'` else - if [ -f /etc/redhat-release ]; then - DISTNAME="RedHat" - DISTVERS=`cat /etc/redhat-release | awk '{ print $5 }'` - else - if [ -f /etc/mandrake-release ]; then - DISTNAME="Mandrake" - # Format: Linux Mandrake release 8.0 (Cooker) for i586 - DISTVERS=`cat /etc/mandrake-release | awk '{ print $4 }'` + # Mandrake test before RedHat, Mandrake has a redhat-release + # file also which is a symbolic link to mandrake-release. + if [ -f /etc/mandrake-release ]; then + DISTNAME="Mandrake" + # Format: Linux Mandrake release 8.0 (Cooker) for i586 + DISTVERS=`cat /etc/mandrake-release | awk '{ print $4 }'` + else + if [ -f /etc/redhat-release ]; then + DISTNAME="RedHat" + DISTVERS=`cat /etc/redhat-release | awk '{ print $5 }'` else if [ -f /etc/rc.d/rc.0 ] && [ -f /etc/rc.d/rc.local ]; then # If Slackware wasn't detected yet it is version 4.0 or older.