-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 El 2014-08-07 a las 00:06 +0200, Bernhard Voelker escribió:
On 08/06/2014 06:17 PM, Carlos E. R. wrote:
I read it that the script survived the kill attempt, but sntp did not.
ooh, that's nasty.
Ain't it? :-)
Well, you only have to tell rcntp to also ignore TERM. ;-) As it's a shell script, you could e.g. do something like (untested):
Ouch. I have the guess that anything called from that script would also be killed, same as rcntp is killed now. What I'm doing now is simply wait it out... I have a "sleep 15" statement in my script, enough wait for networkmanager to do its deed. As it does not check and insist with a kill 9, or try again, but it simply shoots and forget, I just need to wait for the misile to pass, and then I can work in peace ;-) Yes, of course, waiting 15 seconds to sync time is perhaps not the best strategy if you want the machine to have the correct time setup before it attempts to connect to other services. But it is the simplest strategy to implement, needs no hacking at other scripts, no other side effects than those of the delay. I hope ;-) But I'll keep your code in mind for stuudying, thanks :-)
Here's a nice article about advanced issues with trap()ing signals while attempting to return the correct error code. https://lists.gnu.org/archive/html/coreutils/2014-04/msg00046.html
Ok, I have to look at that, but later... Thanks. - -- Cheers Carlos E. R. (from 13.1 x86_64 "Bottle" (Minas Tirith)) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iF4EAREIAAYFAlPi06wACgkQja8UbcUWM1waAQEAmWEG5YWGqq6tCAeULxllzpg/ kt+/4OKKoH+14/02JIABAJGL+XZ9Ab5MO0XRaZZACfE85rlfVgI8CWTkNGTrEioh =k081 -----END PGP SIGNATURE-----