alternative setting of paths installing to alternative prefix

Alex Smith alex at alex-smith.me.uk
Thu Nov 9 16:01:42 GMT 2006


Nico Dietrich wrote:
> Hi!
> 
> Being able to install upstart to an alternative location (such 
> as /opt/upstart) is a good thing for a first try! But: the problem I 
> encounter is that upstart needs to use the telinit-binary 
> from /opt/upstart/sbin/ instead of the old one in /sbin, but the provieded 
> example-scripts just say 'telinit ...'.
> 
> So the only way I found to solve the problem is to replace all occurences of 
> telinit by /opt/../telinit - but then I need to use different init scripts 
> when running in 'alternative-location-mode' then those in 'normal-mode'. 
> 
> Is there a better workaround, like setting the search path to 
> lookup /opt/../sbin first? Could upstart even do that when configured 
> with --prefix=... ?

Yes. If you add this line in the job files to the start of the script 
section (i.e, the first command in the script), it should work in both 
/opt/upstart and normal location:

export PATH=/opt/upstart/sbin:$PATH

Also, remove the path from the line that runs telinit and then it will 
use the first one it finds in the path.

> 
> Thanks,
> Nico
> 
> PS: otherwise, things are running smoothly on debian unstable here!

Thanks,
Alex
-- 
Alex Smith
Frugalware Linux developer - http://www.frugalware.org



More information about the Upstart-devel mailing list