/srv/irclogs.ubuntu.com/2012/05/24/#upstart.txt

flowerpotAm I correct in understanding that pidfiles are not necessary when using upstart?04:45
qkslvrwolfhello, all14:03
qkslvrwolfI'm still having trouble getting my upstart job to work when I need it to.14:03
qkslvrwolfhttp://paste.ubuntu.com/100478114:06
qkslvrwolfI'm trying to make sure that my context script runs BEFORE the network interfaces come up14:06
qkslvrwolfI know this is running14:06
qkslvrwolfbut it runs after something has read /etc/network/interfaces and brought up eth114:06
qkslvrwolfand I can't find out what.14:06
qkslvrwolfwait...prestart scripts run before emitting starting, don't they?14:11
qkslvrwolfnevermind, got it to work.  not as cleanly as I would've liked, but it works.14:30
djszapislangasek: ping17:28
slangasekhi there17:28
djszapislangasek: how can I make sure the sleep 60 in my upstart job is not executed for an install ?17:28
djszapiI mean for package install17:28
djszapiif I would like to stop the currently running instance and start17:28
djszapisince the system is up anyway17:28
djszapiand it is just annoyingly slowing down the reinstall of a new version17:29
djszapiit should only be considered for a boot17:29
slangasekyou could key on the $UPSTART_EVENTS variable17:29
slangasekthis will be empty when started manually (as from a package maintainer script)17:29
djszapiis that a hack or the right approach ?17:30
djszapinot that sleep is already a right approach, but we have not found better way.17:30
djszapislangasek: ^17:31
slangasekthat's the right approach for distinguishing between a manual start and a boot-time start, yes17:31
djszapislangasek: what is the exact syntax ?17:32
slangasekyou're just checking for an environment variable; see /etc/init/lightdm.conf for an example usage17:33
djszapiI do not have lightdm on the pandaboard.17:34
djszapiif [ -n "${UPSTART_STOP_EVENTS}" ]17:35
djszapioh17:35
djszapislangasek: what is the opposite of -n ?17:37
slangasekif ! [ -n "$UPSTART_EVENTS" ] ?17:37
slangasekyou want UPSTART_EVENTS, not UPSTART_STOP_EVENTS; sorry, lightdm.conf uses both17:38
djszapiI know which one we want.17:38
djszapiI did not know the syntax for negation17:38
djszapino, lightdm.conf is simply not available17:38
djszapithat was a bad example17:38
djszapislangasek: http://paste.kde.org/486188/ this one ?17:39
slangasekyou don't want to negate it17:40
slangasekyou want if [ -n "$UPSTART_EVENTS" ]; then sleep 60; fi17:40
slangasekUPSTART_EVENTS is empty in the package install case, non-empty at boot17:40
djszapidoesn't -n mean null ?17:41
djszapias in zero ?17:41
djszapiit means not zero ?17:41
djszapivery weird syntax then...17:41
djszapislangasek: http://paste.kde.org/486194/ this one ?17:42
slangasekyep17:42
djszapislangasek: can I use comment anywhere in that file ?17:43
djszapieven right before the check ?17:43
djszapijust for making a note about this since it is not a usual case...17:43
slangasekyes17:43
slangasekupstart uses the same comment character as the shell (#), so comments are safe anywhere17:44
slangasek(provided you put them on a line by themselves)17:44

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!