Under the old C6 I put an entry in rc.local to run my programs I want. We will call it /path/boot.sh Worked fine.
Under C7 I have created a new service file for systemd. It looks like: --------------- [Unit] Description=Company After=network.target
[Service] Type=forking ExecStart=/path/boot.sh
[Install] WantedBy=multi-user.target
----------- For the most part this works every time on boot.
However - when I do a "yum update" and the kernel changes part of my boot.sh is to detect that kernel change and recompile some of my drivers. The kernel change is detected and the recomiling starts - but after some time the process just stops. If I rerun it manuall it will then complete as normal.
So my question is - Is my service script above not complete? Is they system looking for it to exit in a certain amount of time and it hasnt exited so it KILLs my script ? something like that ?
What is missing from my script so it does not kill it after some time ?
Thanks
Jerry
Try this https://ask.fedoraproject.org/en/question/26898/what-is-the-auto-start-file-...
Eero
18.7.2016 6.42 ip. "Jerry Geis" geisj@pagestation.com kirjoitti:
Under the old C6 I put an entry in rc.local to run my programs I want. We will call it /path/boot.sh Worked fine.
Under C7 I have created a new service file for systemd. It looks like:
[Unit] Description=Company After=network.target
[Service] Type=forking ExecStart=/path/boot.sh
[Install] WantedBy=multi-user.target
For the most part this works every time on boot.
However - when I do a "yum update" and the kernel changes part of my boot.sh is to detect that kernel change and recompile some of my drivers. The kernel change is detected and the recomiling starts - but after some time the process just stops. If I rerun it manuall it will then complete as normal.
So my question is - Is my service script above not complete? Is they system looking for it to exit in a certain amount of time and it hasnt exited so it KILLs my script ? something like that ?
What is missing from my script so it does not kill it after some time ?
Thanks
Jerry _______________________________________________ CentOS mailing list CentOS@centos.org https://lists.centos.org/mailman/listinfo/centos
On Mon, Jul 18, 2016 at 08:06:59PM +0300, Eero Volotinen wrote:
Try this https://ask.fedoraproject.org/en/question/26898/what-is-the-auto-start-file-...
Note: the accepted answer there is wrong, it should be /etc/rc.d/rc.local, not /etc/rc.local. Anyway, using /etc/rc.d/rc.local won't be much different from what the current service is doing.
Hi,
I think it's related to either
TimeoutStopSec=0 TimeoutStartSec=0
You might want to check out these options for your service definition.
Phil.
On Tue, 19 Jul 2016 at 03:21 Jonathan Billings billings@negate.org wrote:
On Mon, Jul 18, 2016 at 08:06:59PM +0300, Eero Volotinen wrote:
Try this
https://ask.fedoraproject.org/en/question/26898/what-is-the-auto-start-file-...
Note: the accepted answer there is wrong, it should be /etc/rc.d/rc.local, not /etc/rc.local. Anyway, using /etc/rc.d/rc.local won't be much different from what the current service is doing.
-- Jonathan Billings billings@negate.org _______________________________________________ CentOS mailing list CentOS@centos.org https://lists.centos.org/mailman/listinfo/centos
On Mon, Jul 18, 2016 at 11:41:21AM -0400, Jerry Geis wrote:
For the most part this works every time on boot.
However - when I do a "yum update" and the kernel changes part of my boot.sh is to detect that kernel change and recompile some of my drivers. The kernel change is detected and the recomiling starts - but after some time the process just stops. If I rerun it manuall it will then complete as normal.
So my question is - Is my service script above not complete? Is they system looking for it to exit in a certain amount of time and it hasnt exited so it KILLs my script ? something like that ?
What is missing from my script so it does not kill it after some time ?
There's nothing that jumps out at me as incorrect, if what you say is true, that it's hung. You might be better off with a oneshot job instead of forking.
Also, the benefit of running this in CentOS7 with systemd is that you can examine the journal to see what exactly its been doing, so if your script is verbose, you should be able to see what its doing. Just run 'journalctl -xl -u YOURUNITNAME.service'. Anything sent to stdout, stderr, syslog or the journal should be there. Perhaps that'll help?
I manage some packages that use dkms for building kernel modules for each new kernel, perhaps that might be a nice structure for you to use to build your kmods? The 'dkms' package is part of EPEL and its home page is here: http://linux.dell.com/dkms