Upstart replaces System V init in CentOS 6
June 4, 2012
Old news, certainly, but I wasn’t able to get upstart to start iaxmodem and Hylafax’ faxgetty properly so after much trial and error, here’s how to make it work…
/etc/sysconfig/init add the following line:
I had tried to create this as a range (ttyIAX[0-9]) but the resulting process ended up being started with /usr/local/sbin/faxgetty ttyIAX[0-9] and nothing worked correctly, so unfortunately for actual operation you’ll have to build a list of your desired ttys.
Create /etc/init/faxgetty.conf
#
# This service maintains a faxgetty on the sepcified device.
stop on runlevel [016]
respawn
instance $TTY
exec /usr/local/sbin/faxgetty $TTY
and /etc/init/iaxmodem.conf
#
# This service maintains an iaxmodem on the sepcified device.
stop on runlevel [016]
respawn
instance $TTY
exec /usr/local/sbin/iaxmodem $TTY
and then create the scripts which start each…
/etc/init/start-faxgettys.conf
# This service starts the configured number of faxgettys.
start on stopped rc RUNLEVEL=[2345]
env ACTIVE_IAXFAX=”ttyIAX0 ttyIAX1 ttyIAX2 ttyIAX3 ttyIAX4 ttyIAX5 ttyIAX6 ttyIAX7 ttyIAX8 ttyIAX9″
task
script
. /etc/sysconfig/init
for ttyIAX in $(echo $ACTIVE_IAXFAX) ; do
initctl start faxgetty TTY=$ttyIAX
done
end script
and /etc/init/start-iaxmodems.conf
# This service starts the configured number of gettys.
start on stopped rc RUNLEVEL=[2345]
env ACTIVE_IAXFAX=”ttyIAX0 ttyIAX1 ttyIAX2 ttyIAX3 ttyIAX4 ttyIAX5 ttyIAX6 ttyIAX7 ttyIAX8 ttyIAX9″
task
script
. /etc/sysconfig/init
for ttyIAX in $(echo $ACTIVE_IAXFAX) ; do
initctl start iaxmodem TTY=$ttyIAX
done
end script
Running Centos 6.2. Any ideas?
Leave a Reply