User1: does "start on stopped job ok" still work?
User1: I ask because it doesn't seem to here
User2: User1 version?
User1: 0.5.1
User2: User1 start on stopped job RESULT=ok
User1: sweet
User1: whats the other RESULT?
User1: RESULT=failed?
User3: surprisingly
User2: User1 although I'd think that would still work... maybe its changed a bit. There's a way
User2: other result was failed I think
User1: ok
User3: you can also just shortcut RESULT=failed and just check EXIT_STATUS=* or something
User1: I removed all the ok's
User1: i'll put them back now
User3: start on stopped job EXIT_SIGNAL=11 etc.
 * sadmac2 tries to imagine the task you want to run on segfault and nowhere else
User3: start on stopped EXIT_SIGNAL=11
User3: exec apport-auto-file $JOB
User2: User3 wouldn't you want SIGABRT in there too?
User2: also SIGILL, SIGFPE, possibly SIGPIPE
User1: hmmm "start on started udev-daemon RESULT=ok" should work right?
User2: it should
User2: unless it became OK or something like that.
 * sadmac2 doesn't have the code in front of him to check on these things
User1: i'll try that..
User1: fsck comes after that, but its not starting for some reason
User2: User1 you could do a start on started udev-daemon and then in the job definition do an export > /tmp/somefile and then look at somefile and see what its getting set to
User1: export what though?
User1: export RESULT > /tmp/$job.result ?
User1: oops
User1: $RESULT
User2: User1 I meant set
User2: User1 no arguments
 * sadmac2 begins to realize how many ways unix has to list all the environment variables
User1: env
User2: set does it too
User1: really?
User2: export I think does a superset of it
User2: yes
User1: never tried that
User1: so it does
User1: i'll check the result now
User1: lol, forgot that before fsck the fs is ro
User2: hmm. just echo it then. stdout should display it
User1: yep
User1: well it has no result really
User2: the environment should be small
User1: at least there is no variable called RESULT
User1: it is
User1: UPSTART_EVENTS=started
User1: closest thing i can find
User2: odd
User1: is this the correct way to use the expressions with the start on stanza http://zeqadious.homelinux.net/junkbin/upstart-0.5.1-jobs/sysinit/save-dmesg ?
User2: User1 maybe... what do you think that will do?'
User1: I think it should start when all conditions inside ( ) are met
User1: but i may not need the ( )
User2: User1 they aren't conditions. They're events. It will start when all the things inside () /happen/
User2: and you need either the \s or the ()s, not both
User1: oh?
User2: oh.
User1: it won't tell me that there are unknown stanzas when it sees  and started sysinit/cleanup RESULT=ok on a line all by itself?
User2: User1 it assumes the line continues until the closing parenthesis
User1: thats great
User1: looks a lot nicer
User1: well that doesn't seem to work right. that job never starts and afaik those other jobs are all RESULT=ok
User2: User1 are all of them started in the first place?
User1: yes
User2: ok. that's the usual reason these things break...
User1: hardest part i'm finding with these upstart scripts is trying to make them robust enough to deal possible breaks
User2: example?
User1: i'm having issues with fsck script for example.  its silently hangs quite often and I can't seem to track why or when.  or like when some script may fail but won't report a failure and so my save-dmesg script never runs but i can't see why :)
User2: first one sounds like an fsck issue
User1: probably
User1: aha
User1: status job should return something right?
User4: I think so
User4: yes. the manpage confirms
User4: initctl status job
User4: (there's no symlink for status, I don't think)
User1: initctl status job returns nothing too
User1: it should shouldn't it?
User4: on 0.5 it might only if the job is running
User1: returns nothing if the job is running
User1: returns nothing if the job isn't running too
User4: weeeeird
User4: what does it return with no argument?
User1: I think the problem this indicates is what is making it so difficult for me to write the scripts.  RESULT=ok for any respawning service doesn't work
User1: initctl status returns all jobs with either running or not running
User4: ok, so that works
User4: ah, so the respawn flag kills the RESULT variable
User4: bug.
User1: aha
User1: also my scripts are all in directories inside jobs.d like jobs.d/service/hald so the job is service/hald
User1: but because of the mangle bug status service/hald returns nothing
User1: just found that status service_2fhald works though
User4: yeah. that's not a new one.
User1: yeah i saw that one in the bug list
User1: this is just the first instance where i had to type the mangled form in to get it to work
User5: respawn is broken in many ways in 0.5
User1: well i filed a bug
User1: 5pm works out.  thanks for the help all, i'm going home.
upstart
Ubuntu IRC