PaulePanter | 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:35 |
---|---|---|
PaulePanter | I cannot look at the screen as this is a remote server. | 05:36 |
PaulePanter | # more /var/log/upstart/udev-fallback-graphics.log | 05:52 |
PaulePanter | FATAL: Error inserting vesafb (/lib/modules/3.8.0-31-generic/initrd/vesafb.ko): No such device | 05:52 |
PaulePanter | Sorry probably wrong channel. | 05:52 |
PaulePanter | So how can I tell upstart to log the errors from initramfs somewhere? | 09:58 |
PaulePanter | http://paste.ubuntu.com/6183185/ | 09:58 |
PaulePanter | I have no access to the screen and just network. I can ping, but SSH does not work. | 09:59 |
jodh | PaulePanter: upstart doesn't run in the initramfs. | 13:27 |
PaulePanter | Even stranger then, why some files in `/var/log/upstart` are written and nothing else. | 13:41 |
xnox | PaulePanter: because rootfs got mounted RW and upstart started to execute? | 13:49 |
xnox | PaulePanter: or it's from previous boots. | 13:49 |
PaulePanter | /var was not separate and on / , so at least `/var/log/dmesg` should have been written. | 14:18 |
tseliot | hi all, do you know how to make sure that an upstart job starts before lightdm does? | 14:27 |
tseliot | apparently "login-session-start" is too late | 14:28 |
jodh | tseliot: "start on starting lightdm" | 14:28 |
tseliot | ah, as simple as that? Thanks | 14:29 |
jodh | tseliot: yes :) | 14:29 |
tseliot | great :) | 14:31 |
xnox | tseliot: e.g. ubiquity job does that. And that's for a system job. | 14:39 |
tseliot | thanks | 14:39 |
tseliot | jodh, xnox: is there a way to start a job on log out? | 15:05 |
xnox | tseliot: yes, but it will be a user session job, not a system one. | 15:06 |
tseliot | xnox: as long as it works | 15:06 |
keruom | 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 |
keruom | But is there anything that prevents me from calling "initctl start A" when the B is not running? | 15:07 |
xnox | tseliot: "start on session-end" i think should kick a job upon logout (.... which could be shutdown, reboot) | 15:08 |
keruom | 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 |
xnox | tseliot: man 7 session-end, you have a TYPE variable which can be "shutdown" or "logout" if you care about that. | 15:09 |
tseliot | xnox: does that work in 12.04? | 15:09 |
xnox | tseliot: no, that's saucy only. | 15:09 |
xnox | tseliot: there is no upstart user sessions in prior releases. | 15:09 |
tseliot | too bad, I really need a solution for 12.04 | 15:10 |
xnox | tseliot: there should be something from gnome-session, where things are run on logout or some such. | 15:10 |
xnox | tseliot: what do you want / need? | 15:10 |
xnox | actually? | 15:10 |
tseliot | xnox: I need to run some programs (with root privileges) as soon as I log out | 15:11 |
xnox | not sure that at all makes sense security-wise. What are you doing? | 15:12 |
tseliot | xnox: disable the discrete graphics card | 15:12 |
xnox | tseliot: ah. | 15:13 |
xnox | tseliot: checkout lightdm's "# session-cleanup-script = Script to run when quitting a user session (runs as root)" | 15:15 |
xnox | would that work for you?! | 15:15 |
tseliot | xnox: are you suggesting that I get the code from there and use it in 12.04? | 15:16 |
xnox | tseliot: lightdm can be configured to run scripts on logout. | 15:17 |
tseliot | ah | 15:17 |
xnox | tseliot: i'm telling you to look into lightdm's capabilities, cause upstart is of no use to you. | 15:18 |
xnox | tseliot: similarly you probably want to look into lightdm's setup as well, instead of going upstart way. | 15:18 |
tseliot | xnox: right, I think it's a good idea. Thanks | 15:18 |
xnox | tseliot: there are many other setup scripts as well in lightdm, for display, greeter, etc. | 15:20 |
tseliot | right | 15:22 |
tseliot | I'll have a look at them, thanks | 15:22 |
keruom | anobody ^^ | 15:31 |
keruom | anybody pls ^^ ? | 15:31 |
xnox | 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:49 |
xnox | keruom: it's perfectely acceptable to run $ initctl start A, and for A to fail to start. | 15:50 |
xnox | keruom: also read the upstart cookbook. | 15:50 |
xnox | linked from the topic. | 15:50 |
xnox | 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. | 15:51 |
keruom | xnox: aha, I thought that there should be some more automatic test for this case | 16:06 |
xnox | 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:11 |
xnox | keruom: you can do this $ initctl emit started JOB='B' | 16:13 |
xnox | which will trigger starting all jobs that depend on B =) | 16:14 |
keruom | xnox: ok :) but I don't believe a normal admin would remember to do it this way | 16:17 |
keruom | 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:17 |
xnox | 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:19 |
xnox | 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:20 |
keruom | xnox: yeah, that's what I learned | 16:21 |
keruom | xnox: sadly :) | 16:21 |
xnox | keruom: you can do "start B" in the A.conf pre-start, to enforce a dependency ;-) | 16:22 |
xnox | 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:23 |
keruom | 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 |
keruom | but it is btw hard to debug your upstart configuration than, isn't it? | 16:25 |
loa | hello | 16:28 |
loa | i created upstart job under ubuntu | 16:29 |
loa | sudo start mjpg-streamer works well | 16:29 |
loa | stop mjpg-streamer too | 16:29 |
loa | but it don't start after system start | 16:29 |
loa | i will show you code of it if you want | 16:29 |
loa | here it is http://pastebin.com/fBez4Rap | 16:30 |
loa | i have ubuntu 13.10 | 16:30 |
loa | what can i check? or maybe i need add my job somewhere | 16:30 |
loa | ? | 16:30 |
keruom | xnox: ^^ that's what I am talking about :) | 18:11 |
Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!