[03:07] <Keybuk> X really doesn't like ioctl()s on its file descriptor
[03:15] <Keybuk> wing-commander scott# cat /etc/event.d/test
[03:15] <Keybuk> on wibble
[03:15] <Keybuk> script
[03:15] <Keybuk>         exit 1
[03:15] <Keybuk> end script
[03:15] <Keybuk> wing-commander scott# initctl emit wibble
[03:15] <Keybuk> wibble
[03:15] <Keybuk> test (start) waiting
[03:15] <Keybuk> test (start) starting
[03:15] <Keybuk> test (start) running, process 8155
[03:15] <Keybuk> initctl: wibble event failed
[03:15] <Keybuk> zsh: exit 1     initctl emit wibble
[03:15] <Keybuk> -- 
[03:15] <Keybuk> sweeeet
[11:34] <Keybuk> wow, my laptop booted this morning *impressed*
[12:04] <_ion> Ooh
[12:10] <Keybuk> I'm finishing up merging the new state machine today
[12:15] <_ion> Cool
[12:17] <Keybuk> of course, I need to fix shutdown first
[01:57] <Keybuk> yay, fixed that
[02:24] <Keybuk> Committed revision 500
[02:24] <Keybuk> woo
[02:31] <_ion> \o/
[02:51] <Keybuk> wing-commander scott# cat /etc/event.d/test
[02:51] <Keybuk> start on wibble
[02:51] <Keybuk> script
[02:51] <Keybuk>         sleep 5
[02:51] <Keybuk>         exit 1
[02:51] <Keybuk> end script
[02:51] <Keybuk> wing-commander scott# initctl emit wibble
[02:51] <Keybuk> wibble
[02:51] <Keybuk> test (start) waiting
[02:51] <Keybuk> test (start) starting
[02:51] <Keybuk> test (start) running, process 2941
[02:51] <Keybuk> test (stop) running
[02:51] <Keybuk> test (stop) stopping
[02:51] <Keybuk> initctl: wibble event failed
[02:51] <Keybuk> zsh: exit 1     initctl emit wibble
[02:51] <Keybuk> yay
[02:54] <_ion> Whee
[07:23] <AlexExtreme> Keybuk, great job with the new features :) you asked for the link to the frugalware upstart repository, it's at http://ftp.frugalware.org/pub/other/people/alex/upstart
[07:24] <AlexExtreme> also if you want an icon for it like debian and ubuntu have there, just use the favicon here: http://frugalware.org/
[07:34] <Keybuk> ok, cool; thanks
[09:48] <Keybuk> AlexExtreme: ok, linked
[09:48] <AlexExtreme> thanks :)
[10:58] <_ion> keybuk: Today's proposition for 'FOO': 'goal', as in 'goal frodo until bilbo', 'goal with multiuser', 'goal network-up until network-down and fhs-mounted until fhs-unmounted'
[11:09] <Keybuk> heh
[11:21] <Keybuk> well
[11:21] <Keybuk> there goes the first of the old state machine ...
[11:21] <Keybuk> 505 changed the enums
[11:56] <mbiebl> Keybuk: do you have a BNF of the job file format (or a detailed spec)?
[11:56] <mbiebl> I wanted to write a syntax file for vim over the weekend.
[11:58] <mbiebl> So you get nice syntax highlighting on editing upstart job files ;-)
[12:00] <Keybuk> I actually don't
[12:00] <Keybuk> feel free to write one based on the config code
[12:00] <Keybuk> let me quickly define it for you
[12:00] <Keybuk> it's a line-based format; newlines end a stanza
[12:00] <Keybuk> Comments begin with '#' and run up to the next newline
[12:01] <Keybuk> whitespace chars are space, tab, \r and \n if inside quotes
[12:01] <Keybuk> newlines inside single or double quotes are ignored
[12:01] <Keybuk> s/ignored/treated as whitespace/ sorry
[12:02] <Keybuk> a slash may be used to cause a single or double quote to be treated as a plain character
[12:02] <Keybuk> and a slash may also be used to treat a newline as a whitespace character
[12:02] <Keybuk> so that's the basic format
[12:03] <Keybuk> an argument is a token of characters up until the first comment, whitespace or newline character that's not quoted
[12:03] <Keybuk> examples
[12:03] <Keybuk>   foo
[12:03] <Keybuk>   bar
[12:03] <Keybuk>   "foo bar"
[12:03] <Keybuk>   foo\ bar
[12:03] <Keybuk>   foo\
[12:03] <Keybuk>   bar
[12:03] <Keybuk> (last two lines is one arg)
[12:03] <Keybuk>   "foo
[12:03] <Keybuk>    bar"
[12:03] <Keybuk> (likewise)
[12:03] <Keybuk>   foo#foo bar
[12:03] <Keybuk> (the token there is foo)
[12:04] <Keybuk> a command is a token of characters up until the first comment or newline
[12:04] <Keybuk> whitespace is part of the command
[12:04] <Keybuk> commands are parsed according to shell rules (i.e. by running "sh -c $COMMAND" )
[12:04] <Keybuk> the only other special thing is a block
[12:05] <Keybuk> that begins on the line after the stanza, and is ended up the phrase "WS? end WS BLOCKTYPE WS? COMMENT? NL"
[12:05] <Keybuk> see init/cfgfile.c for the list of stanzas, and how each one parses what follows
[12:06] <Keybuk> next_arg eats one argument
[12:06] <Keybuk> skip_comment eats a comment and the following newline
[12:06] <Keybuk> parse_args eats all arguments to the end of the line
[12:06] <Keybuk> parse_command eats the following command
[12:06] <Keybuk> some stanzas are more complex than others, expecting second-level words
[12:13] <mbiebl> Ok, thanks for the pointers.
[12:15] <mbiebl> It will be a bit hard to detect a upstart job file, because it doesn't have a special file extension or shebang.
[12:16] <Keybuk> they live in /etc/event.d :p
[12:16] <Keybuk> easy
[12:16] <mbiebl> Yeah, this is the metric I use already ;-)
[12:18] <Keybuk> I don't like "extensions"
[12:18] <Keybuk> you end up with something silly like ".job"
[12:21] <Keybuk> or
[12:21] <Keybuk> /etc/udev/rules.d/foo.rules
[12:21] <Keybuk> (or, worse)
[12:21] <Keybuk> /etc/udev/rules.d/foo-udev.rules
[12:26] <Md> Keybuk: did you add a regexp to ignore dot files, rpm/dpkg/emacs/vi backup files, etc?