I'd suggest using a udev rule that runs simple script to enable/disable your tty. All you'd need to do is match your modem in a udev rule and call a script to change your inittab.
That way it only runs if/when the modem is plugged-in. Cheers, sV On 29 March 2010 11:10, Tom Munro Glass <[email protected]> wrote: > A client is deploying several CentOS machines to remote sites, some of > these > have broadband access but some use dial-up for remote administration. Part > of > the standard configuration is to install a USB modem driver and to add the > following line to /etc/inittab: > > ACM0:2345:respawn:/sbin/mgetty -x 0 -n 6 -D ttyACM0 > > to allow us to dial into the machine. > > This is fine *IF* the USB modem is physically installed and being used, but > on > sites using broadband where a modem is not usually installed > /var/log/messages > fills up with a large amount of the following: > > Mar 28 22:56:50 localhost mgetty[4828]: mod: cannot open line /dev/ttyACM0: > Input/output error > Mar 28 22:56:50 localhost mgetty[4828]: open device /dev/ttyACM0 failed: > Input/output error > Mar 28 22:56:50 localhost mgetty[4828]: cannot get terminal line > dev=ttyACM0, > exiting: Input/output error > Mar 28 22:56:50 localhost init: Id "ACM0" respawning too fast: disabled for > 5 > minutes > > Similar messages are also written to /var/log/mgetty.log.ttyACM0. > > You might think the obvious solution is to not set up the modem if it's not > being used, but this isn't what the client wants. The CentOS machine is > headless, and in the event of a broadband failure we need an engineer to be > able to simply plug in a modem to give us remote access to it. > > So, is there some way of reducing the amount of messages ending up in the > log > files? I have already added '-x 0' to minimise output from mgetty but the > messages shown above are still getting through. > > Tom Munro Glass > >
