Bugs item #694346, was opened at 2003-02-27 05:24
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=380273&aid=694346&group_id=24006

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: Please handle UserExit script return code

Initial Comment:
In our project, I wrote a UserExit script to do some 
configuration. When the script encounter some 
exceptions, it returned a non-zero error code. I hope 
systemconfig can handle the return code and enter into 
SIS buybox shell. But I found systemconfigurator did 
not handle the return code. It always return a zero 
whatever UserExit script return.


I have probed into the source code 
of /usr/bin/systemconfigurator 
and /usr/lib/systemconfig/UserExit.pm:
In /usr/lib/systemconfig/UserExit.pm, the relative 
lines are:      
        sub setup {
            my $config = shift;
            my %userexits = $config->varlist("^
(root|userexit)");

            # compile the list of user exits
            my @exitnames = ();
            foreach my $key (sort keys %userexits) {
                if($key =~ /^(userexit\d+)_cmd$/ and 
$userexits{$key}) {
             push @exitnames, $1;
                }
            }
            foreach my $exit (@exitnames) {
         if(!my_system($userexits{root}, $userexits
{"$exit" . "_cmd"}, $userexits{"$exit" . "_params"})) {
                    carp("Couldn't run " . $userexits
{"$exit" . "_cmd"} . " " .  $userexits
{"$exit" . "_params"});
             return 0;  
                }
    
            return 1;
        }

In /usr/bin/systemconfigurator, the relative lines are:
        if($config->configuserexit()) {
            UserExit::setup($config);
        }

When post_script does NOT work properly, UserExit.pm 
returns 0. Systemconfigurator gets this returned 0, 
BUT it does NOT process this return value.


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=380273&aid=694346&group_id=24006


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Sisuite-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/sisuite-devel

Reply via email to