Carlos E. R. wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256
Hi
I have this call in "/etc/NetworkManager/dispatcher.d/mine":
/usr/local/bin/nm-hook-mine-up $CONEXION >> /var/log/NetworkManager-mine.log &
It runs, and it calls the other script, but this one after 10 seconds, it dies or it is killed.
I'm unsure if the position of the "&" above is correct :-?
Yes, that is the correct syntax. So, your issue is to find out what is killing your shell script. insert the following before your echo ; sleep statements caughtmsg() { echo "caught signal " $1 } print1() { caughtmsg 1 } print2() { caughtmsg 2 } print3() { caughtmsg 3 } . . . . . print64() { caughtmsg 64 } trap print1 1 trap print2 2 trap print3 3 . . . trap print64 64 trap print1 1 trap print2 2 trap print3 3 . . . trap print64 64 # note that signal 9 cannot be trapped.
I know that the script dies, because I have this code in it:
echo "waiting (3)..." ; sleep 3 echo "waiting (6)..." ; sleep 3 echo "waiting (9)..." ; sleep 3 echo "waiting (12)..." ; sleep 3 echo "waiting (15)..." ; sleep 3 echo "waiting (18)..." ; sleep 3
And in the log I see:
waiting (3)... waiting (6)... waiting (9)... waiting (12)...
and goes no further.
- -- Cheers Carlos E. R.
(from 13.1 x86_64 "Bottle" (Minas Tirith)) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux)
iF4EAREIAAYFAlPgDqEACgkQja8UbcUWM1wOMgEAlK/IJE/nk0vzVchL/MtVlRsC QeqHg2PnmILoYc96mLAA/iSkV+63gZx56R1z5y2sJ93lKNfjsy5hLHAjSnbmPSE4 =5cIf -----END PGP SIGNATURE-----
-- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org