Results 1 to 2 of 2
I don't know if I'm doing something wrong or what but I can't get init to execute a command after my tuners are initialized.
Centos 6.3, 2.6.32-220.el6.x86_64
It based on ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 10-15-2012 #1
CentOS upstart not working.
I don't know if I'm doing something wrong or what but I can't get init to execute a command after my tuners are initialized.
Centos 6.3, 2.6.32-220.el6.x86_64
It based on a upstart from mythbuntu where I've added the pvrusb lines.
BEFORE:
It works fine on that but due to stability problems with mythbuntu, centos ran better with my custom driver.Code:# MythTV Backend service description "MythTV Backend" author "Mario Limonciello <superm1@ubuntu.com>" #start on (local-filesystems and net-device-up IFACE=lo and started udev-finish) start on (local-filesystems and net-device-up IFACE=lo and pvrusb2-device-added KERNEL=sn-7876509 and pvrusb2-device-added KERNEL=sn-7806942 and pvrusb2-device-added KERNEL=sn-8342308) stop on starting shutdown #expect fork respawn exec /usr/bin/mythbackend --logfile /var/log/mythtv/mythbackend.log --user mythtv
AFTER:
I can't tell if it's actually reading the file, it's named /etc/init/delay.confCode:# MythTV Backend service description "MythTV Backend" author "Mario Limonciello <superm1@ubuntu.com>" start on (local-filesystems and net-device-up IFACE=lo and pvrusb2-device-added KERNEL=sn-7876509 and pvrusb2-device-added KERNEL=sn-7806942 and pvrusb2-device-added KERNEL=sn-8342308) exec /sbin/service mythbackend start
It's suppose to wait for all my hvr-1950 devices to get assign and firmware uploaded and once done then to exec the command "service mythbackend start"
Running the command in shell works and the mythtv backend does run.
Can anyone tell me what's wrong?
Or if there is a better way to integrate this into /etc/rc.d/init.d/mythbackend? which is based on Fedora init.d mythbackend - MythTV Official Wiki
Any help appreciated.
- 10-17-2012 #2Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 10,141
This is usually due to some race condition with other hardware or software that is not yet properly initialized and started. If you want to make sure that everything else that your stuff depends upon has been started, then put your startup script in /etc/rc.local with a reasonable amount of delay just to be sure that everything is ready to go. You also should check to be sure that your startup code is not susceptible to difference when run in a terminal vs. run detached as it would be on startup. I've had that bite me in the past, including cron jobs where some environment variables were not properly set.
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!


Reply With Quote
