I have all of my upstart config files under version control. My ideal way to use upstart is to create soft links from my version control repository (mercurial – not that it matters) into /etc/init but upstart fails to see the jobs. Everything is fine if I copy the files from the repository directory to /etc/init.
Anyone know why upstart fails to handle symbolic or even hard links?
Thanks
Chris
Best Answer
Upstart does not support symlinks because they might point to a file on a partition that is not loaded at boot time.
I have gotten around this in my own project by putting the conf files in /etc/init/myscripts and then binding that to a directory in my repository.
mount --bind /etc/init/myscripts ~/code/repo/initscripts
.Add this to /etc/fstab and the binding will be persistent:
This effectively gives you hard-linked directories. Upstart will treat the conf files as any other, because they are local to /etc/init. Your DVCS will also see them as local files in the repo, so it will also treat them as it would any other files stored there. Best of both worlds.