/srv/irclogs.ubuntu.com/2013/06/17/#upstart.txt

leehambleyhi 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
leehambleymy 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 started15:24
erkulesahoi, 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
xnoxleehambley: echo "manual" | sudo tee /etc/init/NAME.override15:32
leehambleyxnox: thanks -- is the lack of support for policy-rc.d a known problem?15:32
xnoxleehambley: where NAME is whichever job you want to override, e.g. sabd.override to override sabd.conf15:32
leehambleythanks15:32
xnoxleehambley: there is full support for update-rc.d in saucy and up, not sure about policy-rc.d. Need to check....15:33
leehambleythanks15:33
xnoxerkules: 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
xnoxerkules: http://upstart.ubuntu.com/cookbook/#export ? should work. Can you pastebit your example that is not working?15:35
leehambleyxnox: after creating that file, do I have to do anything to make upstart recognise it, it doesn't seem to be working15:40
xnoxleehambley: define "working" ? what did you put into the .override file and what did you expect to change?15:40
xnoxleehambley: if it has stanza "manual" init, upon boot that job will not automatically start.15:41
leehambleyxnox: I expected that service not to start when it's installed, and not to restart if I kill it (kill -9 <thepid>)15:41
leehambleythe second part isn't working15:41
leehambleyI put the word manual(\n) in that file15:42
erkulesxnox: 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 mktemp15:45
xnoxerkules: 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
xnoxerkules: also please paste your job. Why don't you do everything in "script; end script"? =)15:47
xnoxleehambley: first you need to stop them with "sudo stop NAME"15:49
leehambleyalright, roger that15:49
xnoxleehambley: then in .override put "pre-start script \n stop \n end script"15:49
xnoxleehambley: thus any attempts at starting/respawning jobs will be, well, denied.15:50
leehambleythanks, that looks just like a bigger hammer than "manual"15:50
xnoxleehambley: yeah. manual, only negates "start on" conditions, but package upgrades do "start NAME" explicitly more or less.15:51
leehambleythanks for the clarification xnox :-)15:56
erkulesxnox: http://paste.debian.net/10938/16:18
erkulesxnox: Your workaround didn't worked. So I did it statically 16:18
xnoxerkules: can errors go to stdout or stderr? as they will be collected into /var/log/upstart/mysql anyway.16:23
xnoxerkules: ah you are parsing it as well...16:23
erkulesxnox: every tip is welcome16:24
erkules:)16:24
xnoxerkules:" A script section cannot modify the value of a variable defined in a job configuration file for other script sections."16:32
xnoxsigh16:32
xnoxerkules: http://upstart.ubuntu.com/cookbook/#environment-variables16:32
erkulesxnox: 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!