Problem
I want to start an application from /etc/inittab but it fails with "Command is respawning too rapidly"
Solution
I have an application which I want to start from /etc/inittab. As an example I will use /usr/sbin/rtpm and I want to start this application on tty07.
First of all you need to write some wrapper script which sets the TERM variable and then runs your application. So in this example the wrapper script looks like:
:
TERM=at386-15
export TERM
/usr/sbin/rtpmSave the wrapper script at /usr/bin/wrapper and execute "chmod 0700 /usr/bin/wrapper". For Unixware 7.1.4 use
TERM=AT386-ie
export TERM
/usr/sbin/rtpmNow edit /etc/conf/init.d/kernel and add the following
line at the end of the file:
x01:12345:respawn:su root -c '/usr/bin/wrapper'
< /dev/tty07 > /dev/tty07 2>&1Save & Exit. Run/usr/conf/bin/idmkenv
/usr/conf/bin/idbuild -FBReboot your system. Now rtpm will run on tty07.
NOTES: If you do not set the TERM variable you most probably will
get two errors. Error 1 on the console:Command is respawning too rapidly Check for possible
errors.
id: x01 "su root -c '/usr/bin/wrapper' < /dev/tty07 >
/dev/tty07 2>&1"Error 2 will show up on tty10: "I need to know a more specific terminal type (unknown)"