On 14 May 2014 17:09, James Hunt <[email protected]> wrote:
> Right, it does sound like we need a '--prepend-confdir' option instead:
>
> # read jobs+overrides from /foo, then /etc/init/ (PID 1)
> --prepend-confdir /foo
>
> # read jobs+overrides from /foo, then /bar, then /etc/init/ (PID 1)
> --prepend-confdir /foo --prepend-confdir /bar
>
> # read jobs+overrides from /foo, then /bar, then /hello
> --confdir /hello --prepend-confdir /foo --prepend-confdir /bar
>
> # read jobs+overrides from /bar, then /qux, then /foo, then /bar (PID 1)
> --confdir /foo --prepend-confdir /bar --confdir /baz --prepend-confdir /qux
>
> # read jobs+overrides from /bar, then /qux, then the normal Session Init 
> directories
> --user --prepend-confdir /bar --prepend-confdir /qux
>
> # read jobs+overrides from /bar, then /qux, then /foo, then /baz
> --user --confdir /foo --prepend-confdir /bar --confdir /baz --prepend-confdir 
> /qux
>
> When booting in --debug mode, Upstart will display the directories it is 
> reading jobs from in the order it reads those directories. However, I do 
> wonder if -- to mimimize confusion -- we should add a further option that 
> simply displays the list of directories that would be searched. If that 
> option is specified anywhere on the command line, it would display the search 
> order, then exit. Something like:
>

all looks correct.

> $ init --prepend-confdir /foo --list-confdirs
> /foo
> /etc/init
>
> $ init --user --confdir /foo --prepend-confdir /bar --confdir /baz 
> --prepend-confdir /qux --list-confdirs
> /bar
> /qux
> /foo
> /baz
>

Hm, i wouldn't want to convert init into a client tool. Instead I'd
like to simply e.g. add $ initctl dump-state, which dumps the whole
json state. All conf-sources are serialised in that state, and one can
examine currently monitored conf sources. Or create an $ initctl
list-config-sources which prints serialized conf-sources in a nicer
format. I'd rather inspect conf-sources at runtime, since for e.g.
session init conf-sources depend on the XDG environment variables
which may not be the same if one execs a new/standalone init with the
same args, but different environment.


-- 
Regards,

Dimitri.

https://code.launchpad.net/~jamesodhunt/upstart/bug-1315060/+merge/218953
Your team Upstart Reviewers is requested to review the proposed merge of 
lp:~jamesodhunt/upstart/bug-1315060 into lp:upstart.

-- 
upstart-devel mailing list
[email protected]
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/upstart-devel

Reply via email to