About configuration files for the user session

Dmitrijs Ledkovs dmitrij.ledkov at ubuntu.com
Tue Dec 4 17:50:29 UTC 2012


Currently in upstart by default the following conf-source locations are used:

system jobs:
/etc/init.conf ( cannot be overridden )
/etc/init.d ( can be overridden with UPSTART_CONFDIR, which can be
overridden with --confdir )
user jobs:
~/.init ( cannot be overridden, not enabled by default in ubuntu )

With the introduction of upstart managed user sessions the following
changes will done:

system jobs - stay as they are.

user jobs will have the following priorities (first location wins):

--confdir dir1 (--confdir dir2) [1]
~/.init (legacy location, deprecated)
${XDG_CONFIG_HOME:~/.config}/upstart ( enabled only if --user is passed )
For each dir in ${XDG_CONFIG_DIRS:/etc/xdg} $dir/upstart (enabled only
if --user is passed ) [1]

Now the .overrides. I'd like to support .override file next to the
currently active job file only.
For example:

/etc/xdg/upstart/foo.conf
/etc/xdg/upstart/foo.override
/home/user1/.config/upstart/foo.conf
/home/user2/.config/upstart/foo.override
/home/user3/.config/upstart/foo.conf
/home/user3/.config/upstart/foo.override

The following config file will be used in each case:
user1: /home/user1/.config/upstart/foo.conf
user2: /etc/xdg/upstart/foo.override
user3: /home/user3/.config/upstart/foo.override
others: /etc/xdg/upstart/foo.override

The idea is that we use existing XDG style of overriding config files
by using user home directory.
But we also support upstart override of the job file, if placed in the
same confsource directory right next to the currently active job file.

Does this sound reasonable? I'm trying to cover all corner cases.
By default we will only have /etc/xdg/upstart/*.conf jobs and that's it.

Do we need / want to support specifying multiple --confdir locations
on command line? (currently we only look at the last --confdir
specified)

[1] note with multiple --confdir locations on the command line, the
last one takes highest priority
[2] note with multiple XDG_CONFIG_DIRS the first one takes highest
priority (like $PATH env variable)

Regards,

Dmitrijs.



More information about the upstart-devel mailing list