Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question
1  
Perhaps it was a design decision on the part of the Upstart developers to ignore soft links? Anyway, if your repository is on the same partition as /etc/init, try using hard links. –  Steven Monday Oct 20 '10 at 18:06
    
Tried hard links and that didn't work either :-( –  Chris McCauley Oct 20 '10 at 18:25
    
Lame. Indeed symlinks are ignored without a manual call to reload config. Sigh. I prefer symlinks. Cleaner in my use-case. Oh well. I'll just copy the files in, like jerk. –  Doc Jan 3 at 4:55
add comment

2 Answers

up vote 30 down vote accepted

Upstart watches its configuration directories with inotify and reloads the configuration when any of the files change or a new file is added. Apparently this doesn't work for symlinks.

To manually update the configuration use

$ initctl reload-configuration
share|improve this answer
add comment

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:

/etc/init/myscripts  /home/me/code/repo/initscripts      none    bind

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.