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