[02:49] Very strange. How come sometimes I see logging from upstart on TTY7, and sometimes it's completely empty? [02:50] Seems to work about 30% of the time on each reboot of this server machine. [09:31] mgorbach: wait.... maybe it didn't come up yet. tty7 upstart job needs to start and it's racing in parallel with pretty much everything else =) === adrinou is now known as adrien_oww [15:29] How come sometimes I see logging from upstart on TTY7, and sometimes it's completely empty? [15:29] Seems to work about 30% of the time on each reboot of this server machine. [15:43] hi all, if I wanted to make sure that a job such as the following doesn't start unless a file is available, would I simply have to test the existence of this file and exit 0 if the file doesn't exist? http://paste.ubuntu.com/6546310/ [15:43] or is there a better way (also compatible with precise) [15:47] xnox: ^ [15:49] tseliot: which file are you testing for? [15:49] tseliot: in general if it's the executable binary "/usr/bin/nvidia-persistenced" simply do [15:49] xnox: the actual binary /usr/bin/nvidia-persistenced [15:49] tseliot: right, in that case simply do: exec /usr/bin/nvidia-persistenced --user nvidia-persistenced [15:50] xnox: so, I let it fail? [15:50] tseliot: upstart will notice that the exectuable is not there, and the job will never start and move to stop/failed state. Which is equivalent to any other reasons job may fail to start or not suppose to start. [15:50] tseliot: if you wish you can do [15:51] xnox: if that's acceptable, then it saves me the effort to work around it [15:51] tseliot: pre-start [ ! -x /usr/bin/nvidia-persistenced ] && { stop; exit 0 } [15:51] tseliot: pre-start exec, but that's entirely redundand. [15:51] tseliot: yeah, that's absolutely acceptable, after all all packages can be removed, but not purged and hence init files left around. [15:52] tseliot: upstart was designed for debian/ubuntu like systems ;-) [15:52] xnox: I'll keep it as it is then, thanks a lot :) [15:52] =) [17:15] xnox: so, apparently if that file is a link to the binary, upstart won't use it [17:16] tseliot: can you send / point me to the sample packages? [17:18] xnox: it's this one https://github.com/tseliot/nvidia-graphics-drivers/tree/331-updates (the 331-updates git head) [17:19] xnox: and these two patches on top of it: http://paste.ubuntu.com/6546735/ http://paste.ubuntu.com/6546738/ [17:21] and the actual error in /var/log/upstart/nvidia-persistenced.log is "/bin/sh: 1: exec: /usr/bin/nvidia-persistenced: not found" [17:21] the file is there though, it's a link [17:22] it's a link because it shouldn't show up and/or run when we disable the discrete nvidia card and use only the integrated Intel card on systems with hybrid graphics [17:33] tseliot: why are you using variables? [17:33] tseliot: do you need it to be configurable / overridable? [17:33] xnox: in the job? That comes from nvidia [17:34] tseliot: why is your job "exec $VAR", instead of "exec nvidia-persistenced" [17:34] tseliot: with $VAR you are forking a shell, with "exec nvidia-persistenced" i gets directly execed without a fork to a shell. [17:35] tseliot: i'm nearing end of day and still have a few things to finish off. [17:35] xnox: that's something that I take straight from the nvidia-installer. I can replace with my own upstart job if needed [17:35] (I didn't write it myself) [17:37] xnox: no problem, thanks for your help [17:37] tseliot: can you try: http://paste.ubuntu.com/6546826/ [17:37] xnox: nvidia-persistenced is a daemon BTW [17:37] tseliot: =) [17:38] xnox: oh, I failed to mention that if I start the job manually it seems to work [17:38] tseliot: so how do you start it that makes it fail? [17:39] tseliot: or how does it get started to fail? [17:40] xnox: start on runlevel [2345] [17:40] when that happens, I get the error [17:40] tseliot: try my job and reboot. [17:41] xnox: I think I know where you're getting at ;) Let me try [17:41] tseliot: rm the /var/log/upstart/nvidia*.log first, to make sure you are not looking at old messages. [17:41] * xnox been there, done that..... [17:41] :) [17:53] xnox: I'm not even getting a log now... weird [17:53] and it doesn't start [17:53] unless I do it manually [18:02] tseliot: weird. I'll look into it tomorrow. [18:02] xnox: thanks :)