----- Message from [email protected] ---------
    Date: Mon, 14 Dec 2009 11:48:18 +0100
    From: Paul Slootman <[email protected]>
Subject: Re: Bug#559660: dirvish: environment variables for pre/post client/server scripts not working on lenny
      To: [email protected], [email protected]


[Show Quoted Text - 43 lines][Hide Quoted Text]
On Sun 06 Dec 2009, Robert Spitzenpfeil wrote:

The output was piped to "wall" to immediately show the result. Currently
the result is _empty_ ! Running "set |wall" reveals, that currently all
the DIRVISH variables are put into one single line and are _not_ separated.
Unfortunately you didn't use one of the standard bug report tools (e.g.
reportbug), now I have to ask you what shell you're using, as at least
with bash it works just fine:

$ bash
$ FOO=123 BAR=xyz bash
$ echo $FOO
123
$ echo $BAR
xyz
$


Also with ash (another POSIX shell that's used a lot) no problem:

$ ash
$ FOO=qwe BAR=098 ash
$ echo $FOO
qwe
$ echo $BAR
098
It is immediately obvious that there are no ";" between the variables,
so it can't work !
All that's obvious to me is that you give too little information;
without semicolons in CAN work. That's also why no one responded to your
message on the mailing list, as no one has this problem.

So please give more info about your system, most importantly your
default shell.


Paul
That is strange.

I have this problem on 3 systems. 2 of them run openSUSE, the other one runs debian lenny. I haven't done anything to the shell's configuration on these systems, standard install.

1) openSUSE 11.2 (real computer)

shell: BASH version 4.0.33(1)-release (i586-suse-linux-gnu)

SHELL=/bin/bash
SHELLOPTS=braceexpand:emacs:hashall:histexpand:history:interactive-comments:monitor

perl:  v5.10.0 built for i586-linux-thread-multi
Linux --- 2.6.31.5-0.1-desktop #1 SMP PREEMPT 2009-10-26 15:49:03 +0100 i686 athlon i386 GNU/Linux

2) debian lenny (virtualized)

shell: BASH version 3.2.39(1)-release (x86_64-pc-linux-gnu)

SHELL=/bin/bash
SHELLOPTS=braceexpand:emacs:hashall:histexpand:history:interactive-comments:monitor

perl: v5.10.0 built for x86_64-linux-gnu-thread-multi
Linux --- 2.6.18-028stab064.8 #1 SMP Fri Nov 6 11:28:25 MSK 2009 x86_64 GNU/Linux


On both systems assigning multiple variables by hand works, but it doesn't work with the pre/post scripts unless I add a semicolon as described before. I've had a look at the code again, especially at "scriptrun". It boils down to this:

--- code ---

#!/usr/bin/perl

system("/bin/bash -c 'FOO=123; BAR=456 echo \$FOO>>./out.txt'");

--- code ---

If I run this test code on _any_ linux system that I have access to (home, webserver, uni) '123' will _not_ show up in 'out.txt' if I remove the ";" !

So from my point of view the problem is quite real. Does anybody actually use the Dirvish variables and can report it works without ";" ?


Regards,

Robert






--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to