[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: start-stop-daemon on Debian



On Thu, Apr 15, 1999 at 10:22:29AM +0300, Brock Rozen wrote:
> Hi,
> 
> I'm working on some scripts that will allow various daemons to be
> start/stopped/reloaded from other machines, automatically.
> 
> One solution I've come up with is to use something of the sort:
> 
> ssh remotehost /etc/init.d/daemon reload
> 
> Assume I'm running as root and have made the changes to let it happen w/o
> a password. I'm going to get an error here that it can't find
> "start-stop-daemon". Alternatively, if I change the "daemon" script to
> point to /sbin/start-stop-daemon then it works fine. I tried this with
> /etc/init.d/bind
> 
> Someone mentioned to me that most of the scripts have a line at the top
> like:
> 
> PATH=/sbin:/usr/sbin
> 
> Is there any way that this could be changed?

Well...ideally every script SHOULD set its path to include 
everything it uses (it shouldn't make assumptions of "this is on
my path") I dunno if this is currently policy but I think it is 
goo dpractice...

anyway...why is this  aproblem? why do you want to change it?
isn't that EXACTLY what you want? (ie it has the path so you
don't need to change it)

You could file bugs against any packages that don't contain this
(it may not be policy but...that doesn't stop you from fileing a bug
and making a case for it; then again it may be policy...I dunno I am
too lazy to look)

Also...you coul dmake your own wrapper script which you run instead
which changes the path and then runs the script you specify.
Something like

#!/bin/sh

PATH=/bin:/sbin/:/usr/bin:/usr/sbin ....
exec $1


-Steve
-- 
/* -- Stephen Carpenter <sjc@delphi.com> --- <sjc@debian.org>------------ */
"Every great advance in natural knowledge has involved the absolute 
rejection of authority."
                -- Thomas Huxley 


Reply to: