[04:45] <flowerpot> Am I correct in understanding that pidfiles are not necessary when using upstart?
[14:03] <qkslvrwolf> hello, all
[14:03] <qkslvrwolf> I'm still having trouble getting my upstart job to work when I need it to.
[14:06] <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:11] <qkslvrwolf> wait...prestart scripts run before emitting starting, don't they?
[14:30] <qkslvrwolf> nevermind, got it to work.  not as cleanly as I would've liked, but it works.
[17:28] <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:29] <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:30] <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:31] <djszapi> slangasek: ^
[17:31] <slangasek> that's the right approach for distinguishing between a manual start and a boot-time start, yes
[17:32] <djszapi> slangasek: what is the exact syntax ?
[17:33] <slangasek> you're just checking for an environment variable; see /etc/init/lightdm.conf for an example usage
[17:34] <djszapi> I do not have lightdm on the pandaboard.
[17:35] <djszapi> if [ -n "${UPSTART_STOP_EVENTS}" ]
[17:35] <djszapi> oh
[17:37] <djszapi> slangasek: what is the opposite of -n ?
[17:37] <slangasek> if ! [ -n "$UPSTART_EVENTS" ] ?
[17:38] <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:39] <djszapi> slangasek: http://paste.kde.org/486188/ this one ?
[17:40] <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:41] <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:42] <djszapi> slangasek: http://paste.kde.org/486194/ this one ?
[17:42] <slangasek> yep
[17:43] <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:44] <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)