Hi all,

there were some recent postings about installers that will return 
non-zero return codes even if everything was successful.

I have had this problem myself (mostly when running Win-XP-Hotfixes) and 
suggested a .ignore-all-err switch.

Paul Griffith posted a patch for todo.pl sometime ago, it works fine. 
See below.

@Paul:
Thanks for the patch and sorry for being so late with my feedback.

Regards
Gerhard



----diff start
% diff -Nru todo-orig.pl todo.pl
--- todo-orig.pl        Sun Oct 17 22:51:06 2004
+++ todo.pl     Fri Mar 24 13:08:49 2006
@@ -386,6 +386,19 @@

              $ret = $status;
          }
+        elsif ($cmd =~ /^\.ignore-all-err\s+(.*)$/) {
+            my $new_cmd = $1;
+            my $status = do_cmd ($new_cmd, 1);
+                       my $real_status = $status >> 8;
+
+            if ($real_status == 0) {
+               $ret = 0;
+            } elsif ($real_status == 1 ) {
+               $ret = 1;
+            } else {
+               $ret = 0;
+            }
+        }
          elsif ($cmd =~ /^\.sleep\s+(\d+)$/) {
              my ($secs) = $1;
              print "Sleeping $secs seconds...";
@@ -399,7 +412,7 @@
      }
      else {
          print "Running: $cmd\n";
-        my $status = system $cmd;
+        my $status = system $cmd;
          $ret = $status;
      }

---- diff end


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
unattended-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/unattended-devel

Reply via email to