On Fri, 2005-02-11 at 02:05 -0700, der.hans wrote: > Am 11. Feb, 2005 schwätzte Craig White so: > > > On Fri, 2005-02-11 at 00:43 -0700, Craig White wrote: > > > On Thu, 2005-02-10 at 23:44 -0700, der.hans wrote: > > > > > So the problems that were manifest - I have a number of variables passed > > > to my shell script from Webmin - values of which are obtained by adding > > > a line '/bin/env > /tmp/env.txt' in my shell script. > > > > > > The value of LDAPADMIN_USER must be passed from the shell script to the > > > perl script so that it deletes the right mailbox. I have tested each > > > step by declaring the value of LDAPADMIN_USER at the start of each shell > > > script and then comment it out to test it from within Webmin. > > > > > > The biggest problem I have now is returning the value of 'success' to > > > perl based Webmin. If you can tell me how to do that, I would be ever > > > grateful....I am working with 'return 0' but that isn't making Webmin > > > happy. > > ---- > > OK - I got this worked out - no return values need to be supplied, the > > execution must be perfect and that's fine. > > > > I should admit that after every successful mailbox delete, I re-create > > it so that it shouldn't fail just because it doesn't exist. > > > > I still can't get variable passed from shell script to perl script. > > > > If I run this perl script - first uncommenting the variable > > USERADMIN_USER it runs fine. > > > > #! /usr/bin/perl -w > > > > #my $USERADMIN_USER='test2'; > > # Perl keeps environmental variables in the $ENV hash. > my $USERADMIN_USER = $ENV{ 'USERADMIN_USER' }; > > # Better yet: > # if( $ENV{ 'USERADMIN_USER' } ) { > # my $USERADMIN_USER = $ENV{ 'USERADMIN_USER' }; > # } else { > # # print "Throw an error\n"; > # # exit 1; # Throw a fit. > # } > > # BTW, this is really a good example of something for the devel list ;-). ---- you are a wonderful human being. As for the example code, I'd be willing to share the probably 40 lines of code that I have approximately 7 hours developing and if I wasn't so tired, I would do the math and get really depressed. I can't even blame this on my lack of knowledge of perl because my lack of knowledge on the details of shell scripting had me beating my head against the wall first. A perl class for idiots would be a wonderful thing ;-) Thanks - and bless you Craig --------------------------------------------------- PLUG-discuss mailing list - PLUG-discuss@lists.plug.phoenix.az.us To subscribe, unsubscribe, or to change you mail settings: http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss