severity 350693 wishlist tags 350693 + wontfix thanks Hello
On Tue, Jan 31, 2006 at 10:32:54AM +0100, Vincent LOUPIEN wrote: > Package: ntop > Version: 2:3.0-5 > > When i invoke the ntop command script to restart it with crond > (/etc/init.d/ntop restart), I have got some errors in it's execution, like : > > Stopping network top daemon: /etc/init.d/ntop: line 31: start-stop-daemon: > command not found > Ntop not stopped. Need to kill manually. > Starting network top daemon: /etc/init.d/ntop: line 19: start-stop-daemon: > command not found > > When i invoke it from command line or with the webmin module "crond", the > same > command works fine ! > > After a little research, it seems to miss the $PATH in this script with the > minimals "bin" directories, like : > PATH=/sbin:/bin:/usr/sbin:/usr/bin > > Thanks and best regards for all jobs ... I'm not sure that this is actually a bug. You will have this problem for most /etc/init.d/* scripts. I think it is valid to assume that you are root and have a path to /sbin and /usr/sbin in addition to the normal ones. You can also set the path on the cron script and it is also recommended that you do that if you are doing things that have to do with system. I'm actually not sure that it is a good thing to set the PATH inside the initscript. I get a feeling that it can break things in certain configurations, but I have no proof. If you can provide a pointer to some policy, common practice or similar I can of course change my mind. Anyway, thanks for reporting the problem. It is appriciated even if I'm not convinced that is something that I should change. :) Regards, // Ola > -- > ____________________________________________________________ > Vincent LOUPIEN - Centre de Ressources Informatiques > Batiment Langues, Nouvelles Technologies - Bureau 303 > Universite Pierre Mendes France - Domaine Universitaire > 79, rue des Universites - BP 47 - F-38040 Grenoble Cedex 9 > Tel : (+33).04.76.82.57.58 - Fax : (+33).04.76.82.83.13 > ____________________________________________________________ > > -- --------------------- Ola Lundqvist --------------------------- / [EMAIL PROTECTED] Annebergsslingan 37 \ | [EMAIL PROTECTED] 654 65 KARLSTAD | | +46 (0)54-10 14 30 +46 (0)70-332 1551 | | http://www.opal.dhs.org UIN/icq: 4912500 | \ gpg/f.p.: 7090 A92B 18FE 7994 0C36 4FE4 18A1 B1CF 0FE5 3DD9 / --------------------------------------------------------------- -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]