[01:49] Keybuk: thanks for ur advice yesterday, i finally got my script ported to access directly the keyboard [01:49] Keybuk: and it works [01:50] Keybuk: :) [01:50] Keybuk: i just have 1 question, I created my weird daemon file in /etc/event.d/ [01:51] Keybuk: in which I make it start on level 2,3,4,5 [01:53] Keybuk: when I reboot, the daemon is not started [02:04] how did you write it? [02:39] Keybuk: u still there? [02:40] plese excuse me, i will flood the irc a bit [02:40] description "weird service daemon" [02:40] author "Trung Le" [02:40] start on runlevel 2 [02:40] start on runlevel 3 [02:40] start on runlevel 4 [02:40] start on runlevel 5 [02:40] stop on runlevel 0 [02:40] stop on runlevel 1 [02:40] stop on runlevel 3 [02:40] stop on runlevel 6 [02:40] console output [02:40] exec /var/www/perlscript/control.pl [02:40] respawn [02:40] Keybuk: this is the code [02:40] should work [02:41] i know [02:41] but when I restart [02:41] the script doesn't executed [02:41] .... [02:41] or should i add in [02:41] start on startup? [02:44] assuming you're using Ubuntu? [02:45] yes [02:45] Keybuk: Ubuntu Gutsy [02:46] how do you know it's not running? [02:46] well [02:46] initctl list [02:47] i know immediately [02:47] right [02:47] but it may have run, and then failed and restarted enough times to be stopped [02:47] hmm [02:47] but it works [02:47] if i run start weird [02:47] or stop weird [02:48] that's why I suspect it is failing for some reason when run at startup [02:48] hmm [02:48] Keybuk: hint on debug? [02:48] replace exec with [02:48] script [02:48] touch /tmp/foo [02:48] exec ... [02:48] end script [02:49] and see whether /tmp/foo apperas [02:49] okay [02:49] i do it now [02:50] Keybuk: rebooting [02:50] Keybuk: the bug might be with the order services starts [02:50] exactly [02:50] you'll be starting before anything in /etc/rc2.d [02:51] Keybuk: b/c my script need mpdd and lcdd [02:51] Keybuk: those 2 are SysVinit services [02:51] oh [02:51] that's why it doesn't work then :) [02:51] Keybuk: if those services are not started, then my script won't work [02:51] Keybuk: can u show me how to make sure it loads after those 2 [02:51] so yeah, your service is being started and then fails [02:51] start on stopped rc2 [02:51] start on stopped rc3 [02:51] etc. [02:51] instead of on runlevel 2 [02:52] okay [02:52] perfecto!!! [02:52] it works!! [02:52] i am so happy! [02:53] thank you so much u know [05:09] * Keybuk hmms [05:09] I almost forgot to not "bzr push" there [06:03] \o/ [06:35] Keybuk: Hey. [06:35] heyhey [06:36] I took another shot at troubleshooting upstart yesterday, with your quick bash script. [06:36] exec strace /sbin/init "$@" [06:36] Unfortunately, that means that /sbin/init is no-longer associated with process id 0, which it explicitly checks before dying. [06:37] Which makes sense, I remember seeing that before. [06:37] oh, right [06:37] damn [06:37] I'd forotten that [06:37] Next time I feel like it, I _could_ remove that check from the source code myself, and recompile init... [06:39] I'm thinking I might as well just revert to bsd-style init, though - unless you have some good ideas? [06:40] the way I'd debug it would be to break in the initramfs before exec'ing init [06:40] and then open up a new vt with bash running [06:40] so I could run initctl events and initctl jobs from it [06:41] What initramfs? ;) [06:42] make one :p [06:43] init is hard to debug [06:43] you have a strange unexpected behaviour [06:43] you may be able to get away with something like: [06:43] start on startup [06:43] script [06:43] initctl jobs > /tmp/jobs.txt [06:44] initctl events > /tmp/events.txt [06:44] wait [06:44] end script [06:44] but you'd need a writeable filesystem for that [06:44] oh and "&" on the ends of those lines :p [06:44] It's writable very early on. [06:44] earlier than the mount_stage1 you're trying to debug? :p [06:44] actually [06:45] It's the _end_ of mount_stage1 that's the problem. :) [06:45] your mount_stage1 is console output right? [06:45] add initctl jobs & initctl events & to the top of it [06:45] That's a good idea. [06:46] Maybe upstart needs a more extreme --debug form which collects as much info as possible in a useful form, saving it to /var/log/upstart.dbg? [06:47] Which remounts the filesystem in rw by default - this is just a debug, so that should be an acceptable special-case? [06:48] there's no really portable way to remount the root rw [06:48] mount -o rw,remount / only works for the 95% case [06:48] (which may be enough) [06:59] 5% of the case where it simply outputs to the screen should satisfy the rest. ;) [06:59] heh [06:59] And besides, those who can't simply remount the root filesystem are probably very aware of that. ;) [06:59] actually, if you can get syslog started early enough, it'll get logged that way [07:00] I often capture --debug by doing init=/bin/bash [07:00] mount -o rw,remount / [07:00] /etc/init.d/sysklogd start [07:00] Not many people run from read-only flash drives or cdr's, and not know about it. :) [07:00] exec /sbin/init [07:00] You don't get the issue with the proc id check? [07:00] or LVM, RAID, etc. that requires more complex bootstrap [07:00] not if you exec it [07:00] Ahh, point. [07:01] This system is actually running from a USB stick, btw. ;) [07:02] Well, if it were working, it'd be running on it. :) [07:02] Going to watch a movie. [07:04] heh [07:04] have fun [07:04] but those should give you some ideas to debug what the hell is goingon [07:05] if it's a kernel bug, I'm going to do a drive-by on some of the developers [07:05] I've had enough of those this month [07:14] It's a fairly recent kernel, too. :) [07:14] At least, it was very recent not long ago. [07:15] oh [07:15] I can guarantee my kernel is more recent than yours [07:15] I don't think the patch is embargo'd until tomorrow :p [07:15] it turns out that upstart's test suite doubles as a proof-of-concept kernel exploit [07:21] Interesting. [07:22] Though, "recent"ness is a flexible concept. [07:22] At the time I built the system, the kernel had been out for... several minutes. ;) [07:22] Anyway, Stargate time! === soren_ is now known as soren [09:54] hello, is anyone here who could tell me how to use grub in ubuntu 7.10 to boot into a certain runlevel, lets say 3 [09:55] Default is 2, but appending a 3 in the grub menu item, does not help... Guess its due to upstart [10:02] hello, is anyone here who could tell me how to use grub in ubuntu 7.10 to boot into a certain runlevel, lets say 3 [10:02] Default is 2, but appending a 3 in the grub menu item, does not help... Guess its due to upstart [10:07] Mogliii: a bit of googling suggests: [10:07] kernel /boot/vmlinuz-2.6.17-11-386 root=/dev/sda1 ro quiet splash runlevel=3 [10:08] is that the syntax you were using? [10:08] no, I used "/boot/vmlinuz-2.6.17-11-386 root=/dev/sda1 ro quiet splash 3" [10:08] can you try it with runlevel=3 then :) [10:09] ok, I will. Guess I am not the only one with that problem... https://launchpad.net/ubuntu/+source/upstart/+bug/85014 [10:10] ahh [10:10] the page i found was in spanish but had a similar script [10:10] So I will be gone for 5-10 minutes. Have to try it. Will check back again... [10:10] Mogliii: wait a sec [10:10] ok... [10:11] you will need a workaround script.. [10:12] this is the page that suggested runlevel=3... [10:12] http://www.xinug.org/drupal/upstart-runlevel-boot-time [10:12] but i can't figure any of the other bits out.. [10:12] you might be better waiting for one of devs, im just a lurker :) [10:14] ok, so it does not work with runlevel=3 on ubuntu 7.10. Thats a good thing, so the problem is not with me :) [10:14] Thank you [10:24] “The ‘#pragma’ command is specified in the ANSI standard to have an arbitrary implementation-defined effect. In the GNU C preprocessor, ‘#pragma’ first attempts to run the game ‘rogue’; if that fails, it tries to run the game ‘hack’; if that fails, it tries to run GNU Emacs displaying the Tower of Hanoi; if that fails, it reports a fatal error. In any case, preprocessing does not continue.” – Manual for the GNU C preprocessor for GNU CC 1.34. [10:29] lol [13:05] any developer online? [13:28] Mogliii: hello [13:30] hi, are you an upstart developer? [13:30] yes [13:30] I am not sure if you saw the stuff further up, but I am having trouble with passing a runlevel via grub [13:31] What I want to do is to have an entry in grub to start in runlevel 3. I want to execute a backup script and shutdown afterwards. [13:31] So to backup I only have to choose an entry and can go to sleep... [13:31] you were given the answer above [13:31] you mean with that workaround script? [13:31] right [13:31] and you found the bug that says you can't do it [13:32] will there ever be a clean solution for this? [13:32] yes, that's why there's a bug open [13:32] but for longer than march... Ok, I will try to understand how to implement the script... [13:35] Thank you for your time! [14:14] Keybuk: it's me again [14:14] Keybuk: does upstart relates to shutdown process? [14:14] it does the shutdown process, yes [14:14] Keybuk: is there anyway to know if the system reach the safe point ("System now halted") so I can press Power button? [14:15] Keybuk: my machine will not have Monitor [14:15] it should say it on the console [14:15] Keybuk: the fact I am designing a media player w/o Console or monitor [14:15] Keybuk: only the LCD screen [14:15] can it not power itself off? [14:15] Keybuk: small 20x4 dot matrix Matrix Orbital one [14:15] Keybuk: no [14:16] how come? that seems to be a bug :) [14:16] Keybuk: the fact LCD daemon killed by then so I can't show the output that system is now safe to turn off [14:16] Keybuk: heh? [14:16] Keybuk: really [14:16] well, most hardware can power itself off now [14:16] Keybuk: i compile ACPI, APM [14:16] Keybuk: i am using VIA EPA EN12000EG, not power off at all [14:17] did you try shutdown -h -P ? [14:18] let me try [14:18] said time expected [14:18] okat [14:18] shutdown -h -P now [14:18] works [14:19] waiting for it shutting down [14:19] hmm [14:19] no auto poweroff [14:19] it said System Halted [14:21] ok [14:21] I guess you'll need to patch the kernel to notify you in some other useful way [14:21] (the System Halted message comes from the kernel) [14:22] k [14:22] Keybuk: so... what do i need to debug? [14:23] I have no idea :-) [14:24] Keybuk: then know any can help me out here? [14:24] kernel developers [14:25] any specific channel for that? [14:25] no idea [14:31] Keybuk: fixed [14:31] Keybuk: thx, i append acpi=force to the kernel in menu.lst of grub [15:19] Yo. [15:19] :) [15:19] Just want to poke people for adding a dbus interface to upstart :) [15:20] s/for adding/to add/ [15:21] I already have one [15:22] hmm, it's already been added? [15:23] Keybuk: any idea which version of upstart? [15:24] not in a released version [15:28] Keybuk: but it should be in the next released version? [15:28] yes [15:28] 0.5.0 will be d-bus based [15:31] Keybuk: what happened to 0.4 ? [15:32] there is no 0.4 === mbiebl_ is now known as mbiebl