[Bug 1315060] Re: Allow --confdir to look for system jobs in more than one directory
James Hunt
1315060 at bugs.launchpad.net
Fri May 2 13:39:23 UTC 2014
If custom system jobs need to be supported, the only realistic option
atm is to create a sub-directory below /etc/init/ (say
/etc/init/custom/). However, that doesn't help here since custom
components need to be contained below /custom/.
Note that Upstart does _not_ honour sym links in /etc/init/ by design
(rationale being that all jobs required to boot a system should be
available in one known location at boot).
______
Note that there *is* a way to do what you want, but it's not really a
practical proposition as you'll see: you could create an
/etc/init/custom.conf job that runs a Session Init as root:
init --user --confdir /custom
However, there are major caveats to doing this:
1) You would need to join that upstart session to control or query the
status of the custom jobs:
http://upstart.ubuntu.com/cookbook/#joining-a-session
In other words, start/stop/restart/initctl would not work unless you
set UPSTART_SESSION first. This would all work, but could get very
confusing.
2) You would need to create an XDG_RUNTIME_DIR for root so that the
session init could create a session file to allow an admin to join the
session.
3) You would need to specify an alternate log directory for the session
init since you would be able to have a system job and a custom job with
the same name and they would then overwrite each others log by default:
--logdir /var/log/upstart/custom/
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to upstart in Ubuntu.
https://bugs.launchpad.net/bugs/1315060
Title:
Allow --confdir to look for system jobs in more than one directory
Status in The Savilerow project:
New
Status in “upstart” package in Ubuntu:
Triaged
Status in “upstart” source package in Utopic:
Triaged
Bug description:
A requirement from OEMs/Carriers for customization is to allow for
customized upstart jobs/overrides. It seems that the best way to do
this would be to allow --confdir to take multiple directories, so that
we can include a directory under /custom.
As for session jobs, I assume we can just set /custom as an
XDG_CONFIG_DIR, and have /custom/upstart with jobs there.
ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: upstart 1.12.1-0ubuntu4
ProcVersionSignature: Ubuntu 3.13.0-24.46-generic 3.13.9
Uname: Linux 3.13.0-24-generic x86_64
NonfreeKernelModules: fglrx
ApportVersion: 2.14.1-0ubuntu3
Architecture: amd64
CurrentDesktop: Unity
Date: Thu May 1 12:30:09 2014
InstallationDate: Installed on 2013-04-26 (370 days ago)
InstallationMedia: Ubuntu 13.04 "Raring Ringtail" - Release amd64 (20130424)
ProcKernelCmdline: BOOT_IMAGE=/boot/vmlinuz-3.13.0-24-generic root=UUID=610268d4-9acd-4bf8-a1a1-95c88b3ccf59 ro quiet splash vt.handoff=7
SourcePackage: upstart
UpgradeStatus: Upgraded to trusty on 2013-11-23 (158 days ago)
UpstartBugCategory: System
UpstartRunningSessionVersion: init (upstart 1.12.1)
UpstartRunningSystemVersion: init (upstart 1.12.1)
To manage notifications about this bug go to:
https://bugs.launchpad.net/savilerow/+bug/1315060/+subscriptions
More information about the foundations-bugs
mailing list