[15:26] <xnox> does nih_list_add_before exist?
[17:45] <Varazir> Hello 
[17:46] <Varazir> Hello I have made a script to run on up start http://pastebin.ca/2291905 I get error  " /proc/self/fd/9: 18: [: on: unexpected operator" if I run the script by it self like this http://pastebin.ca/2291900 it works 
[17:48] <SpamapS> Varazir: thats interesting...
[17:49] <SpamapS> Varazir: it kind of looks like the variable expansion isn't working right
[17:50] <Varazir> ok 
[17:50] <Varazir> is there a way to easy debug ? 
[17:50] <SpamapS> Varazir: but I don't see any obvious reason that would fail
[17:50] <SpamapS> Varazir: set -x
[17:50] <SpamapS> Varazir: also if you're on 12.04 or later, you should get any uncaught output in /var/log/upstart/yourjobname.log
[17:51] <Varazir> it's where I found the error msg 
[17:52] <Varazir> set -x didn't give any more info 
[17:55] <xnox> Varazir: what is $1?
[17:56] <Varazir> 8 or 0 
[17:56] <Varazir> err 5 or 0 
[17:57] <Varazir> the script starts up my TV and AVR befor lightdm starts XBMC
[17:57] <Varazir> using a CEC adapter 
[17:58] <jrib> Varazir: maybe you can check what the value of $power actually is before it enters until?
[17:59] <SpamapS> the ""'s should, in theory, handle that
[17:59] <SpamapS> Varazir: I see what xnox is asking. There's a reference to $1 without anything setting it. Upstart certainly won't set it
[18:00] <SpamapS> On line 21
[18:00] <SpamapS> power=$(cec_power $1) >/dev/null 2>&1   # Assign power state to $power 
[18:00] <SpamapS> thats basically always going to be just   $(cec_power)
[18:00] <Varazir> yes it's inside a function 
[18:00] <Varazir> that I call with the value 0 or 5 
[18:01] <jrib> oh,  yes, line 21 is part of the cec_power_on() definition... I missed that
[18:02] <Varazir> echo "test $power" should give me output in the upstart log file correct ? 
[18:02] <jrib> *cough* indentation *cough* :)
[18:02] <SpamapS> oh right, its indented horribly ok
[18:02] <SpamapS> Varazir: yeah, you really need to start indenting things
[18:03] <Varazir> I have just that pastebin dosn't show it 
[18:04] <Varazir> err it indenting stuff 
[18:04] <Varazir> I see I should ofc indent the untill loop too
[18:06] <Varazir> I added echo "test $power" but nothing came up in the log file 
[18:09] <Varazir> it's strange that it keeps running the untill loop 
[18:10] <Varazir> I can see in my own logfile that the $power is set 
[18:13] <Varazir> tested the script again standalone and it worked like a charm 
[18:14] <SpamapS> Varazir: perhaps the cec tools expect some env vars to be set.
[18:15] <Varazir> I can't see it's that complaning over 
[18:15] <jrib> you have = in one script and == in the other by the way
[18:15] <Varazir> that's changed 
[18:16] <Varazir> http://pastebin.ca/2291931
[18:17] <jrib> Varazir: if you change "#!/bin/sh" to "#!/bin/sh -e", the result is the same?  I'm not sure why it would matter, but let's see...
[18:18] <Varazir> worked
[18:18] <Varazir> same result 
[18:19] <Varazir> http://pastebin.ca/2291935 output with set -x running the script 
[18:21] <Varazir> init-checkconf /etc/init/start-htpc.conf
[18:21] <Varazir> ERROR: failed to ask Upstart to check conf file
[18:23] <slangasek> xnox: do you plan to take care of Debian bug #695604 in libnih, or should I add it to my list?
[18:23] <Varazir> http://pastebin.ca/2291936
[18:24] <Varazir> jrib: and SpamapS: I need to go I'm back in 1.5 
[18:24] <Varazir> hour 
[20:54] <Varazir> ello