The new CentOS 6 comes with Upstart, replacing init. I am trying to convert an /etc/inittab file to the new upstart format. This particular server only has 15 or so inittab entries, however, other servers have >30. We are mainly wanting the 'respawn' part of inittab and upstart. However, I have been reading all the upstart documentation I can find, (which is pretty much ALL based on Ubuntu, and apparently on an older version of upstart) and not getting anywhere. I can create a config file (lets call it /etc/init/test.conf). The file contains this (note, anonymized)
start on runlevel  stop on starting shutdown respawn #Comment about what it does exec su -c "/usr/bin/ssh -2CNL 11111:127.0.0.1:11111 10.10.1.1" username
If I issue a
initctl reload-configuration the job is recognized. I can start it by calling
initctl start test and the job will start.
However, this won't work on a reboot, only manually. I have tried modifying the start command to the following, all with no luck
start on started start on (local-filesystems and net-device-up IFACE!=lo) start on net-device-up IFACE=eth0
and about a dozen other ways I could see mentioned in different examples. none seem to start the script. (test.conf, like all the other files in this folder, are owned by root, and 644)
Am I missing something glaringly obvious?