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