Thursday, 10 July 2008

Ubuntu Dialin

In work, I was asked to set up a dialin server.

Ubuntu 8.04 LTS, Hardy Heron, is the OS installed on the PC. Modem is USB modem MT5634ZBA from MultiTech.

Googled for help to set up the service, this is the one very useful, http://ubuntuforums.org/showthread.php?t=150339.

Install mgetty first.

Ubuntu does not have inittab any more, so in my case add this file under /etc does not work at all.

The usb modem is ttyACM0. Add a file called ttyACM0 under /etc/event.d and the contents are,

start on runlevel-2
start on runlevel-3
start on runlevel-4
start on runlevel-5

stop on shutdown

respawn /sbin/mgetty ttyS0

Then restart the service and it works!

For Ubuntu 10.04, there is no event.d any more.
Under /etc/init, create a new file called ttyACM0.conf and add following into this file.

start on stopped rc RUNLEVEL=[2345]
stop on runlevel [!2345]

respawn
exec /sbin/mgetty -n 2 ttyACM0

Start mgetty by "start ttyACM0".

No comments: