leehambley | hi all, can anyone tell me if there's a way to skip starting services when they're installed, I'm fighting netatalk and samba, i've implemented a policy-rc.d which forbids samba/etc - | 15:24 |
---|---|---|
leehambley | my policy rejected them both, and I see the syslogs from my policy-rc.d - but I still ended up with /etc/init/{sa,nm}bd.conf files, and the services both started | 15:24 |
erkules | ahoi, I want to 'globaly' define a tmpfile pass a value from pre-start to exec. For that I would like to do something like env ARGUMENT=$(mktemp) in the 'global' section. It doesn't work and using a fixed path is no solution for me :( | 15:25 |
xnox | leehambley: echo "manual" | sudo tee /etc/init/NAME.override | 15:32 |
leehambley | xnox: thanks -- is the lack of support for policy-rc.d a known problem? | 15:32 |
xnox | leehambley: where NAME is whichever job you want to override, e.g. sabd.override to override sabd.conf | 15:32 |
leehambley | thanks | 15:32 |
xnox | leehambley: there is full support for update-rc.d in saucy and up, not sure about policy-rc.d. Need to check.... | 15:33 |
leehambley | thanks | 15:33 |
xnox | erkules: you should define environmental variables outside of any block, and then set it in pre-start, and read it in script/post-start. | 15:34 |
xnox | erkules: http://upstart.ubuntu.com/cookbook/#export ? should work. Can you pastebit your example that is not working? | 15:35 |
leehambley | xnox: after creating that file, do I have to do anything to make upstart recognise it, it doesn't seem to be working | 15:40 |
xnox | leehambley: define "working" ? what did you put into the .override file and what did you expect to change? | 15:40 |
xnox | leehambley: if it has stanza "manual" init, upon boot that job will not automatically start. | 15:41 |
leehambley | xnox: I expected that service not to start when it's installed, and not to restart if I kill it (kill -9 <thepid>) | 15:41 |
leehambley | the second part isn't working | 15:41 |
leehambley | I put the word manual(\n) in that file | 15:42 |
erkules | xnox: I can setting an variable 'outside' works. But doing some expansion stuff doesn't i.e. env ARG=$(mktemp) or env ARG=`mktemp` then ARG is set to $(mktemp) and not the output of the command mktemp | 15:45 |
xnox | erkules: correct. do env ARG=; in pre-start ARG=$(mktemp); and then in exec/script/post-start/pre-post-stop it should be available. | 15:46 |
xnox | erkules: also please paste your job. Why don't you do everything in "script; end script"? =) | 15:47 |
xnox | leehambley: first you need to stop them with "sudo stop NAME" | 15:49 |
leehambley | alright, roger that | 15:49 |
xnox | leehambley: then in .override put "pre-start script \n stop \n end script" | 15:49 |
xnox | leehambley: thus any attempts at starting/respawning jobs will be, well, denied. | 15:50 |
leehambley | thanks, that looks just like a bigger hammer than "manual" | 15:50 |
xnox | leehambley: yeah. manual, only negates "start on" conditions, but package upgrades do "start NAME" explicitly more or less. | 15:51 |
leehambley | thanks for the clarification xnox :-) | 15:56 |
erkules | xnox: http://paste.debian.net/10938/ | 16:18 |
erkules | xnox: Your workaround didn't worked. So I did it statically | 16:18 |
xnox | erkules: can errors go to stdout or stderr? as they will be collected into /var/log/upstart/mysql anyway. | 16:23 |
xnox | erkules: ah you are parsing it as well... | 16:23 |
erkules | xnox: every tip is welcome | 16:24 |
erkules | :) | 16:24 |
xnox | erkules:" A script section cannot modify the value of a variable defined in a job configuration file for other script sections." | 16:32 |
xnox | sigh | 16:32 |
xnox | erkules: http://upstart.ubuntu.com/cookbook/#environment-variables | 16:32 |
erkules | xnox: thats why my original plan was to do ARGUMENT=$(mktemp) outside. Which as you rightly told is not working. | 16:36 |
Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!