Re: Fixing bash script bogosity - help?

2009-04-28 Thread Ignacio Vazquez-Abrams
On Mon, 2009-04-27 at 22:37 +0200, Martin Langhoff wrote: > Hi all, > > I have a simple shell scripting problem :-) you'll find attached a > shell script that ships with ejabberd. It is a fairly straightforward > bit of code, and allows us to control bits of the ejabberd internals > with a nice cl

Re: Fixing bash script bogosity - help?

2009-04-28 Thread Martin Langhoff
On Mon, Apr 27, 2009 at 11:34 PM, wrote: > b) change the "bash -c" line to be: >    $ERL_COMMAND "$@" Yes - that's the trivial one ;-) > c) to fix the runuser invocation (assuming it's broken, and i guess >    it probably is), i think will be trickier.  i'm sure we can fix >    it though. That

Re: Fixing bash script bogosity - help?

2009-04-28 Thread Ignacio Vazquez-Abrams
On Tue, 2009-04-28 at 11:17 +0200, Martin Langhoff wrote: > On Tue, Apr 28, 2009 at 9:27 AM, Ignacio Vazquez-Abrams > wrote: > >> # in the script, the CMD is built up as a string > >> CMD="touch $@" > > > > http://mywiki.wooledge.org/BashFAQ/050 > > That repeats what we know already. The thing is

Re: Fixing bash script bogosity - help?

2009-04-28 Thread Martin Langhoff
On Tue, Apr 28, 2009 at 1:01 PM, Ignacio Vazquez-Abrams wrote: > Which part of the following doesn't work? Just test your minimal 3 line script with the example input I've given you. It breaks: # cat > sample.sh #! /bin/bash CMD=(touch "$@") bash -c "${c...@]}" # ./sample.sh "this is file one"

Re: Fixing bash script bogosity - help?

2009-04-28 Thread Ignacio Vazquez-Abrams
On Tue, 2009-04-28 at 13:07 +0200, Martin Langhoff wrote: > On Tue, Apr 28, 2009 at 1:01 PM, Ignacio Vazquez-Abrams > wrote: > > Which part of the following doesn't work? > > Just test your minimal 3 line script with the example input I've given > you. It breaks: > > # cat > sample.sh > #! /bin/

Re: Fixing bash script bogosity - help?

2009-04-28 Thread Martin Langhoff
On Tue, Apr 28, 2009 at 9:27 AM, Ignacio Vazquez-Abrams wrote: >> # in the script, the CMD is built up as a string >> CMD="touch $@" > > http://mywiki.wooledge.org/BashFAQ/050 That repeats what we know already. The thing is that we are building the command as a string for runuser, which wants it

Re: Fixing bash script bogosity - help?

2009-04-28 Thread Martin Langhoff
On Tue, Apr 28, 2009 at 12:03 PM, Ignacio Vazquez-Abrams wrote: > But if you're willing to let go of this futile quest to keep $CMD a > string then you'll find that it can be done: Your example doesn't work. I don't care about keeping $CMD as a string, I think you are misunderstanding the problem

Re: [Server-devel] Fixing bash script bogosity - help?

2009-04-28 Thread Andrew McMillan
Hi Martin, Perhaps: = #!/bin/bash -x [ -n "$DEBUG" ] && set -o xtrace declare -a inparms declare -i i=0 while true; do inparms[$i]="${1/\"/\\\"}" shift || break i=$(( $i + 1 )) done printargs() { local -i j=0 while [ $j -lt $i ] ; do print

Re: Fixing bash script bogosity - help?

2009-04-28 Thread Martin Langhoff
On Tue, Apr 28, 2009 at 1:19 PM, Ignacio Vazquez-Abrams wrote: > Ah, I see now. > > Try this: > > bash -c 'touch "$@"' "${c...@]}" Riiight, that works better... but > Or in the case of the full script: > > bash -c "$ERL"' "$@"' "${erl_comma...@]}" ...it doesn't work for runuser -- which is the

Re: [Server-devel] Fixing bash script bogosity - help?

2009-04-28 Thread Andrew McMillan
On Tue, 2009-04-28 at 23:25 +1200, Andrew McMillan wrote: > Hi Martin, > > Perhaps: > > = > #!/bin/bash -x > > [ -n "$DEBUG" ] && set -o xtrace > > declare -a inparms > > declare -i i=0 > while true; do > inparms[$i]="${1/\"/\\\"}" Sorry, that should

Re: Fixing bash script bogosity - help?

2009-04-28 Thread Bert Freudenberg
On 28.04.2009, at 13:37, Martin Langhoff wrote: > On Tue, Apr 28, 2009 at 1:19 PM, Ignacio Vazquez-Abrams > wrote: >> Ah, I see now. >> >> Try this: >> >> bash -c 'touch "$@"' "${c...@]}" > > Riiight, that works better... but > >> Or in the case of the full script: >> >> bash -c "$ERL"' "$@"' "$

Re: OLPC upgrade from build 656 to latest stable build 767

2009-04-28 Thread Walter Bender
You should not have needed a developer key to update to 767, since it is a signed release image from OLPC. (You will need a key for exploring the experimental builds, such as the recent SoaS images from Sugar Labs.) Regarding the update to TamTamEdit, this is not an uncommon problem with the activ

Re: Fixing bash script bogosity - help?

2009-04-28 Thread pgf
bert wrote: > > On 28.04.2009, at 13:37, Martin Langhoff wrote: > > > On Tue, Apr 28, 2009 at 1:19 PM, Ignacio Vazquez-Abrams > > wrote: > >> Ah, I see now. > >> > >> Try this: > >> > >> bash -c 'touch "$@"' "${c...@]}" > > > > Riiight, that works better... but > > > >> Or in the c

Re: Fixing bash script bogosity - help?

2009-04-28 Thread Ignacio Vazquez-Abrams
On Tue, 2009-04-28 at 12:38 +0200, Martin Langhoff wrote: > On Tue, Apr 28, 2009 at 12:03 PM, Ignacio Vazquez-Abrams > wrote: > > But if you're willing to let go of this futile quest to keep $CMD a > > string then you'll find that it can be done: > > Your example doesn't work. I don't care about

Re: Fixing bash script bogosity - help?

2009-04-28 Thread Bert Freudenberg
On 28.04.2009, at 14:27, p...@laptop.org wrote: > bert wrote: >> >> On 28.04.2009, at 13:37, Martin Langhoff wrote: >> >>> On Tue, Apr 28, 2009 at 1:19 PM, Ignacio Vazquez-Abrams >>> wrote: Ah, I see now. Try this: bash -c 'touch "$@"' "${c...@]}" >>> >>> Riiight, that w

Re: Fixing bash script bogosity - help?

2009-04-28 Thread pgf
bert wrote: > > On 28.04.2009, at 14:27, p...@laptop.org wrote: > > > bert wrote: > >> > >> On 28.04.2009, at 13:37, Martin Langhoff wrote: > >> > >>> On Tue, Apr 28, 2009 at 1:19 PM, Ignacio Vazquez-Abrams > >>> wrote: > Ah, I see now. > > Try this: > > ba

Re: Fixing bash script bogosity - help?

2009-04-28 Thread Bert Freudenberg
On 28.04.2009, at 15:09, p...@laptop.org wrote: > bert wrote: >> >> On 28.04.2009, at 14:27, p...@laptop.org wrote: >> >>> bert wrote: On 28.04.2009, at 13:37, Martin Langhoff wrote: > On Tue, Apr 28, 2009 at 1:19 PM, Ignacio Vazquez-Abrams > wrote: >> Ah, I see now. >

Re: CL1B power distribution

2009-04-28 Thread C. Scott Ananian
On Sat, Apr 25, 2009 at 12:12 AM, John Watlington wrote: > This is the current power distribution diagram for A-phase CL1B, identifying > what we can power, when, and how. I wonder if one could easily support running an LED backwards as an ambient light monitor in Gen 1.5 - it seems that automati

Re: Fixing bash script bogosity - help?

2009-04-28 Thread Martin Langhoff
On Tue, Apr 28, 2009 at 3:28 PM, Bert Freudenberg wrote: > $ su root -c '/bin/echo "$@"' /bin/echo one two three Interesting - seems to work as runuser root -c '/bin/touch "$@"' /bin/touch "one two" "thre\"ee" but for some reason it doesn't work on my script. Any ideas on how to apply this

Re: Fixing bash script bogosity - help?

2009-04-28 Thread pgf
bert wrote: > > On 28.04.2009, at 15:09, p...@laptop.org wrote: > > > bert wrote: > >> > >> On 28.04.2009, at 14:27, p...@laptop.org wrote: > >> > >>> bert wrote: > > > Maybe you should use su directly instead of runuser? > >>> > >>> won't that have the same prob

Re: XO Gen 1.5

2009-04-28 Thread C. Scott Ananian
On Thu, Apr 23, 2009 at 1:46 PM, Greg Smith wrote: > The video decompression acceleration will be a huge value. The primary > test is of course YouTube which I think means Flash flv. I would put > that on an early test list and I hope there's no driver incompatible BS > like with Geode. The H. cod

Re: XO Gen 1.5

2009-04-28 Thread Peter Robinson
>> The video decompression acceleration will be a huge value. The primary >> test is of course YouTube which I think means Flash flv. I would put >> that on an early test list and I hope there's no driver incompatible BS >> like with Geode. The H. codecs could pay off in better video >> conferencin

Re: Fixing bash script bogosity - help?

2009-04-28 Thread Martin Langhoff
On Tue, Apr 28, 2009 at 4:30 PM, Martin Langhoff wrote: > On Tue, Apr 28, 2009 at 3:28 PM, Bert Freudenberg > wrote: >> $ su root -c '/bin/echo "$@"' /bin/echo one two three > > Interesting - seems to work as > >    runuser root -c '/bin/touch "$@"' /bin/touch "one two" "thre\"ee" > > but for so

Re: Fixing bash script bogosity - help?

2009-04-28 Thread pgf
martin wrote: > On Tue, Apr 28, 2009 at 4:30 PM, Martin Langhoff > wrote: > > On Tue, Apr 28, 2009 at 3:28 PM, Bert Freudenberg > wrote: > >> $ su root -c '/bin/echo "$@"' /bin/echo one two three > > > > Interesting - seems to work as > > > >    runuser root -c '/bin/touch "$@"' /bin/to

Battery recovery issues

2009-04-28 Thread Emiliano Pastorino
Hello everyone, I'm trying to recover a battery than seems to be broken. This is what I've done so far: - I've plugged the battery on an unsecured XO. - When I run "watch-battery" from the ok prompt, I get a "No battery" message. - I tried "see-bstate" and I get an infinite output of "0 1 2 0 1

OLPC Volunteer Infrastructure Group Meeting: [Today]

2009-04-28 Thread Stefan Unterhauser
The Volunteer Infrastructure Group (/gang) Meeting is today (April 21th) at 4pm (EST) The Volunteer Infrastructure Group is a team of Volunteer Sysadmins who help maintain services and systems around OLPC and the OLPC/SugarLabs community. The weekly VIG meeting is an excellent chance to get invol

Re: [Olpc-sysadmin] OLPC Volunteer Infrastructure Group Meeting: [Today]

2009-04-28 Thread Henry Edward Hardy
Having computer problems and plumbing problems @home. Will be there on IRC if possible. HH On Tue, Apr 28, 2009 at 3:25 PM, Stefan Unterhauser wrote: > The Volunteer Infrastructure Group (/gang) Meeting is today (April > 21th) at 4pm (EST) > > The Volunteer Infrastructure Group is a team of Vol

Re: [Server-devel] ds-backup.py backup_url server check

2009-04-28 Thread Martin Langhoff
On Tue, Apr 28, 2009 at 9:01 PM, Dave Bauer wrote: > Thanks for the tips. I am testing with my XO. What version of browse.xo do I > need that supports the magic cookies? Do I need to upgrade my XO software or > download certain new files? No prob. You want Browse-101 or newer, that's all. m --

Re: Battery recovery issues

2009-04-28 Thread Richard A. Smith
Emiliano Pastorino wrote: > > - I tried "see-bstate" and I get an infinite output of "0 1 2 0 1 2 0 1 > 2 0 1 2" This means the battery is not responding to 1-wire reset. Nothing more you can do with out an o-scope. Probably not worth the time to go further unless you have a lot of them

Re: Battery recovery issues

2009-04-28 Thread Richard A. Smith
Emiliano Pastorino wrote: > How can I tell the difference between a > completely http://wiki.laptop.org/go/XO_Troubleshooting_Battery#Diagnosing_Battery_Problems If see-bstate shows you more than just 0 1 2 then the battery is something you can work with. -- Richard Smith One Laptop Per C

Re: [Server-devel] Filtering and authentication

2009-04-28 Thread Reuben K. Caron
All of the documentation is contained within their download. It appears like a nice lightweight solution. It is basically a captive portal that requires authentication before allowing access to the internet. It takes a different approach then netreg using dynamically created iptables generated afte

Re: CL1B power distribution

2009-04-28 Thread James Cameron
On Tue, Apr 28, 2009 at 10:15:47AM -0400, C. Scott Ananian wrote: > I wonder if one could easily support running an LED backwards as an > ambient light monitor in Gen 1.5 - it seems that automatically > powering off the backlight in bright sunlight would lead to a lot of > power savings for most yo

Re: CL1B power distribution

2009-04-28 Thread david
On Wed, 29 Apr 2009, James Cameron wrote: > On Tue, Apr 28, 2009 at 10:15:47AM -0400, C. Scott Ananian wrote: >> I wonder if one could easily support running an LED backwards as an >> ambient light monitor in Gen 1.5 - it seems that automatically >> powering off the backlight in bright sunlight wo

Re: CL1B power distribution

2009-04-28 Thread John Watlington
On Apr 28, 2009, at 7:31 PM, da...@lang.hm wrote: > On Wed, 29 Apr 2009, James Cameron wrote: > >> On Tue, Apr 28, 2009 at 10:15:47AM -0400, C. Scott Ananian wrote: >>> I wonder if one could easily support running an LED backwards as an >>> ambient light monitor in Gen 1.5 - it seems that automat

Re: CL1B power distribution

2009-04-28 Thread david
On Tue, 28 Apr 2009, John Watlington wrote: > On Apr 28, 2009, at 7:31 PM, da...@lang.hm wrote: > >> On Wed, 29 Apr 2009, James Cameron wrote: >> >>> On Tue, Apr 28, 2009 at 10:15:47AM -0400, C. Scott Ananian wrote: I wonder if one could easily support running an LED backwards as an amb

Re: [Server-devel] Fixing bash script bogosity - help?

2009-04-28 Thread pgf
andrew wrote: > On Tue, 2009-04-28 at 23:25 +1200, Andrew McMillan wrote: > > Hi Martin, > > > > Perhaps: > > > > = > > #!/bin/bash -x > > > > [ -n "$DEBUG" ] && set -o xtrace > > > > declare -a inparms > > > > declare -i i=0 > > while true

Re: CL1B power distribution

2009-04-28 Thread david
On Tue, 28 Apr 2009, da...@lang.hm wrote: > On Tue, 28 Apr 2009, John Watlington wrote: > >> On Apr 28, 2009, at 7:31 PM, da...@lang.hm wrote: >> >>> On Wed, 29 Apr 2009, James Cameron wrote: >>> On Tue, Apr 28, 2009 at 10:15:47AM -0400, C. Scott Ananian wrote: > I wonder if one could eas

Re: CL1B power distribution

2009-04-28 Thread John Watlington
On Apr 28, 2009, at 8:16 PM, da...@lang.hm wrote: > On Tue, 28 Apr 2009, John Watlington wrote: > >> On Apr 28, 2009, at 7:31 PM, da...@lang.hm wrote: >> >>> On Wed, 29 Apr 2009, James Cameron wrote: On Tue, Apr 28, 2009 at 10:15:47AM -0400, C. Scott Ananian wrote: > I wonder if one coul

Re: CL1B power distribution

2009-04-28 Thread david
On Tue, 28 Apr 2009, John Watlington wrote: > On Apr 28, 2009, at 8:16 PM, da...@lang.hm wrote: > >> On Tue, 28 Apr 2009, John Watlington wrote: >> >>> On Apr 28, 2009, at 7:31 PM, da...@lang.hm wrote: >>> On Wed, 29 Apr 2009, James Cameron wrote: > On Tue, Apr 28, 2009 at 10:15:47AM -0

Re: CL1B power distribution

2009-04-28 Thread John Watlington
All of our LEDs are dual (one on the inside and one on the outside). Instead of running these in parallel, and throwing away the extra voltage, I run them in series directly from the battery voltage (ever notice that their brightness changes when you plug in the charger ?) Cheers, wad On Apr 28,

Re: CL1B power distribution

2009-04-28 Thread david
On Tue, 28 Apr 2009, John Watlington wrote: > All of our LEDs are dual (one on the inside and one on the outside). > Instead of running these in parallel, and throwing away the extra > voltage, I run them in series directly from the battery voltage > (ever notice that their brightness changes when

Re: CL1B power distribution

2009-04-28 Thread Bobby Powers
On Tue, Apr 28, 2009 at 8:36 PM, John Watlington wrote: > > On Apr 28, 2009, at 8:16 PM, da...@lang.hm wrote: > >> On Tue, 28 Apr 2009, John Watlington wrote: >> >>> On Apr 28, 2009, at 7:31 PM, da...@lang.hm wrote: >>> On Wed, 29 Apr 2009, James Cameron wrote: > On Tue, Apr 28, 2009 at 1