flowerpot | Am I correct in understanding that pidfiles are not necessary when using upstart? | 04:45 |
---|---|---|
qkslvrwolf | hello, all | 14:03 |
qkslvrwolf | I'm still having trouble getting my upstart job to work when I need it to. | 14:03 |
qkslvrwolf | http://paste.ubuntu.com/1004781 | 14:06 |
qkslvrwolf | I'm trying to make sure that my context script runs BEFORE the network interfaces come up | 14:06 |
qkslvrwolf | I know this is running | 14:06 |
qkslvrwolf | but it runs after something has read /etc/network/interfaces and brought up eth1 | 14:06 |
qkslvrwolf | and I can't find out what. | 14:06 |
qkslvrwolf | wait...prestart scripts run before emitting starting, don't they? | 14:11 |
qkslvrwolf | nevermind, got it to work. not as cleanly as I would've liked, but it works. | 14:30 |
djszapi | slangasek: ping | 17:28 |
slangasek | hi there | 17:28 |
djszapi | slangasek: how can I make sure the sleep 60 in my upstart job is not executed for an install ? | 17:28 |
djszapi | I mean for package install | 17:28 |
djszapi | if I would like to stop the currently running instance and start | 17:28 |
djszapi | since the system is up anyway | 17:28 |
djszapi | and it is just annoyingly slowing down the reinstall of a new version | 17:29 |
djszapi | it should only be considered for a boot | 17:29 |
slangasek | you could key on the $UPSTART_EVENTS variable | 17:29 |
slangasek | this will be empty when started manually (as from a package maintainer script) | 17:29 |
djszapi | is that a hack or the right approach ? | 17:30 |
djszapi | not that sleep is already a right approach, but we have not found better way. | 17:30 |
djszapi | slangasek: ^ | 17:31 |
slangasek | that's the right approach for distinguishing between a manual start and a boot-time start, yes | 17:31 |
djszapi | slangasek: what is the exact syntax ? | 17:32 |
slangasek | you're just checking for an environment variable; see /etc/init/lightdm.conf for an example usage | 17:33 |
djszapi | I do not have lightdm on the pandaboard. | 17:34 |
djszapi | if [ -n "${UPSTART_STOP_EVENTS}" ] | 17:35 |
djszapi | oh | 17:35 |
djszapi | slangasek: what is the opposite of -n ? | 17:37 |
slangasek | if ! [ -n "$UPSTART_EVENTS" ] ? | 17:37 |
slangasek | you want UPSTART_EVENTS, not UPSTART_STOP_EVENTS; sorry, lightdm.conf uses both | 17:38 |
djszapi | I know which one we want. | 17:38 |
djszapi | I did not know the syntax for negation | 17:38 |
djszapi | no, lightdm.conf is simply not available | 17:38 |
djszapi | that was a bad example | 17:38 |
djszapi | slangasek: http://paste.kde.org/486188/ this one ? | 17:39 |
slangasek | you don't want to negate it | 17:40 |
slangasek | you want if [ -n "$UPSTART_EVENTS" ]; then sleep 60; fi | 17:40 |
slangasek | UPSTART_EVENTS is empty in the package install case, non-empty at boot | 17:40 |
djszapi | doesn't -n mean null ? | 17:41 |
djszapi | as in zero ? | 17:41 |
djszapi | it means not zero ? | 17:41 |
djszapi | very weird syntax then... | 17:41 |
djszapi | slangasek: http://paste.kde.org/486194/ this one ? | 17:42 |
slangasek | yep | 17:42 |
djszapi | slangasek: can I use comment anywhere in that file ? | 17:43 |
djszapi | even right before the check ? | 17:43 |
djszapi | just for making a note about this since it is not a usual case... | 17:43 |
slangasek | yes | 17:43 |
slangasek | upstart uses the same comment character as the shell (#), so comments are safe anywhere | 17: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!