Last update 29-Jan-2001

 

Setup mgetty for MBSE BBS

To handle incoming calls you can use mgetty written by Gert Doering, (gert@greenie.muc.de). Others may work. You have to compile mgetty with the -DFIDO flag to accept Fidonet mailer calls. If you want incoming PPP calls as well, add the -DAUTO_PPP as well. Below you can see the mgetty.config and login.config for mgetty that I use. I have also included a part of my /etc/inittab to show how mgetty will spawn from init.


# inittab       This is only a part of my /etc/inittab!
#               In this example it runs in runlevel 3 and 4.
#
# Serial lines
s1:34:respawn:/usr/local/sbin/mgetty -i /opt/mbse/etc/issue ttyS0
#
# End of /etc/inittab

# mgetty configuration file: mgetty.config
#
# ----- global section -----
#
# In this section, you put the global defaults, per-port stuff is below
#
# set the global debug level to "4" (default from policy.h)
debug 4
#
# set the local fax station id
fax-id ++31-255-515973
#
# access the modem(s) with 38400 bps
speed 38400
#
#  use these options to make the /dev/tty-device owned by "uucp.uucp" 
#  and mode "rw-rw-r--" (0664). *LEADING ZERO NEEDED!*
port-owner uucp
port-group uucp
port-mode 0664
#
#  use these options to make incoming faxes owned by "root.uucp" 
#  and mode "rw-r-----" (0640). *LEADING ZERO NEEDED!*
fax-owner root
fax-group uucp
fax-mode 0640
#
#
# ----- port specific section -----
# 
# Here you can put things that are valid only for one line, not the others
#
# Dynalink 1428EXTRA faxmodem at port 0 (COM1).
#
port ttyS0
speed 57600
switchbd 19200
modem-type cls2
init-chat "" \d\dAT&F&C1&D3X4W2B0M0Q0V1H0&K3S0=0 OK
#
# end of mgetty.config

# login.config
#
# This is a sample "login dispatcher" configuration file for mgetty
#
# Format:
#	username userid utmp_entry login_program [arguments]
#
# Meaning:
#       for a "username" entered at mgettys login: prompt, call
#	"login_program" with [arguments], with the uid set to "userid",
#	and a USER_PROCESS utmp entry with ut_user = "utmp_entry"
#
#
# Use this one for fido calls (login name /FIDO/ is handled specially)
#
#  mgetty has to be compiled with "-DFIDO", otherwise a fido call won't
#  be detected.
#
/FIDO/	mbse	fido	/opt/mbse/bin/mbcico @
#
#
# Automatic PPP startup on receipt of LCP configure request (AutoPPP).
#  mgetty has to be compiled with "-DAUTO_PPP" for this to work.
#  Warning: Case is significant, AUTOPPP or autoppp won't work!
#  Consult the "pppd" man page to find pppd options that work for you.
#  See also PPP-HOWTO on how to set this up.
#
/AutoPPP/ -	a_ppp	/etc/ppp/paplogin
#
# This is the "standard" behaviour - *dont* set a userid or utmp
#  entry here, otherwise /bin/login will fail!
#  This entry isn't really necessary: if it's missing, the built-in
#  default will do exactly this.
#
*	-	-	/bin/login @
#
# You might use this instead, it will directly start the BBS when the call
# is not a PPP call and not a Fidonet mailer. Use only one of these two!
# THIS IS NOT YET TESTED!
#
*	-	-	/opt/mbse/bin/mbsebbs
#
# end of login.config

If you use /bin/login the users can get confused by the Unix login prompt. Most of them are used to DOS based bbs systems and will try to login with two names which won't work of course. For this reason I have added the -i /opt/mbse/etc/issue options to the mgetty line in /etc/inittab. The file /opt/mbse/etc/issue is a plain textfile explaining users how to login to start the bbs. It could look like this:


      .--.     Welcome at MBSE BBS Development.
     |o_o |    --------------------------------
     |:_/ |
    //   \ \   This may or may not work today...
   (|     | )
  /'\_   _/`\
  \___)=(___/  
Powered by Linux.

To start the bbs login with "bbs" without quotes.
Voor het bbs login met "bbs" zonder aanhalingstekens.
There is a default /opt/mbse/etc/issue installed by the installation script. You need to edit this to insert your bbs name in it or even completely replace this file for a nicer one. Don't make it too big, don't put control characters in it as this may prevent some mailers to connect to your system.

I discovered that some systems don't have the right permissions on the serial port for MBSE BBS. To fix this type the following commands:

su
password: enter root password here
chmod 666 /dev/ttyS0
chown uucp.uucp /dev/ttyS0
exit
Note that /dev/ttyS0 is for COM1, /dev/ttyS1 for COM2 etc.

Back Go Back