[05:35] Hi. Any idea, how with Ubuntu 12.04 there can be nothing in `/var/log/dmesg`, but reboots with Ctrl + Alt + Del are logeed in `/var/log/wtmp`? [05:36] I cannot look at the screen as this is a remote server. [05:52] # more /var/log/upstart/udev-fallback-graphics.log [05:52] FATAL: Error inserting vesafb (/lib/modules/3.8.0-31-generic/initrd/vesafb.ko): No such device [05:52] Sorry probably wrong channel. [09:58] So how can I tell upstart to log the errors from initramfs somewhere? [09:58] http://paste.ubuntu.com/6183185/ [09:59] I have no access to the screen and just network. I can ping, but SSH does not work. [13:27] PaulePanter: upstart doesn't run in the initramfs. [13:41] Even stranger then, why some files in `/var/log/upstart` are written and nothing else. [13:49] PaulePanter: because rootfs got mounted RW and upstart started to execute? [13:49] PaulePanter: or it's from previous boots. [14:18] /var was not separate and on / , so at least `/var/log/dmesg` should have been written. [14:27] hi all, do you know how to make sure that an upstart job starts before lightdm does? [14:28] apparently "login-session-start" is too late [14:28] tseliot: "start on starting lightdm" [14:29] ah, as simple as that? Thanks [14:29] tseliot: yes :) [14:31] great :) [14:39] tseliot: e.g. ubiquity job does that. And that's for a system job. [14:39] thanks [15:05] jodh, xnox: is there a way to start a job on log out? [15:06] tseliot: yes, but it will be a user session job, not a system one. [15:06] xnox: as long as it works [15:07] Hi all. This must be obvious but I can not find a good answer for it - suppose I want to have a service A that depends on another service B- if service B is not running there is no point in running service A. I would use "start on started B". [15:07] But is there anything that prevents me from calling "initctl start A" when the B is not running? [15:08] tseliot: "start on session-end" i think should kick a job upon logout (.... which could be shutdown, reboot) [15:09] as I can see it right now, there isn't a way how to do it. The only solution would be to put some checks in "pre-start" but it seems redundant and ugly for me. I believe upstart must have something to handle this. [15:09] tseliot: man 7 session-end, you have a TYPE variable which can be "shutdown" or "logout" if you care about that. [15:09] xnox: does that work in 12.04? [15:09] tseliot: no, that's saucy only. [15:09] tseliot: there is no upstart user sessions in prior releases. [15:10] too bad, I really need a solution for 12.04 [15:10] tseliot: there should be something from gnome-session, where things are run on logout or some such. [15:10] tseliot: what do you want / need? [15:10] actually? [15:11] xnox: I need to run some programs (with root privileges) as soon as I log out [15:12] not sure that at all makes sense security-wise. What are you doing? [15:12] xnox: disable the discrete graphics card [15:13] tseliot: ah. [15:15] tseliot: checkout lightdm's "# session-cleanup-script = Script to run when quitting a user session (runs as root)" [15:15] would that work for you?! [15:16] xnox: are you suggesting that I get the code from there and use it in 12.04? [15:17] tseliot: lightdm can be configured to run scripts on logout. [15:17] ah [15:18] tseliot: i'm telling you to look into lightdm's capabilities, cause upstart is of no use to you. [15:18] tseliot: similarly you probably want to look into lightdm's setup as well, instead of going upstart way. [15:18] xnox: right, I think it's a good idea. Thanks [15:20] tseliot: there are many other setup scripts as well in lightdm, for display, greeter, etc. [15:22] right [15:22] I'll have a look at them, thanks [15:31] anobody ^^ [15:31] anybody pls ^^ ? [15:49] keruom: correct way to check if a service can be run is in pre-start, and abort then with non-zero exit code. Or just make your exec fail, and well it should fail if the conditions are not right. [15:50] keruom: it's perfectely acceptable to run $ initctl start A, and for A to fail to start. [15:50] keruom: also read the upstart cookbook. [15:50] linked from the topic. [15:51] there are plenty of things that will fail to run, when manually triggered with $ initctl start A, when it's dependencies are not actually satisfied. [16:06] xnox: aha, I thought that there should be some more automatic test for this case [16:11] keruom: if root wants to start something, one should be able to. And we never assume that it will actually succeed, it may or it may not. [16:13] keruom: you can do this $ initctl emit started JOB='B' [16:14] which will trigger starting all jobs that depend on B =) [16:17] xnox: ok :) but I don't believe a normal admin would remember to do it this way [16:17] xnox: sure, root can start what ever he wants to, but not through upstart scripts, if there is a hard dependency :) (or with --force or something) [16:19] keruom: upstart is not a dependency based system. it has no dependency resolution. there are no hard dependencies. only events, and reacting to events (either start or stop) [16:20] similarly init.d scripts, despite declaring LSB headers & dependencies, one can always just execute them directly and see what happens, e.g. $ service foo start [16:21] xnox: yeah, that's what I learned [16:21] xnox: sadly :) [16:22] keruom: you can do "start B" in the A.conf pre-start, to enforce a dependency ;-) [16:23] to get the semantics of if B fails to start, A will not start either. Or otherwise check status of B in A's pre-start. See examples in the cookbook, for cases where such strong guards are wanted. [16:25] xnox: ok, thanks, I just thought there could be a better way. But you are right, since it is event based, it doesn't make much sense [16:25] but it is btw hard to debug your upstart configuration than, isn't it? [16:28] hello [16:29] i created upstart job under ubuntu [16:29] sudo start mjpg-streamer works well [16:29] stop mjpg-streamer too [16:29] but it don't start after system start [16:29] i will show you code of it if you want [16:30] here it is http://pastebin.com/fBez4Rap [16:30] i have ubuntu 13.10 [16:30] what can i check? or maybe i need add my job somewhere [16:30] ? [18:11] xnox: ^^ that's what I am talking about :)