diff options
author | Glenn L McGrath <bug1@ihug.co.nz> | 2003-08-30 12:27:36 +0000 |
---|---|---|
committer | Glenn L McGrath <bug1@ihug.co.nz> | 2003-08-30 12:27:36 +0000 |
commit | 502907f5b33cd10cbe2a2eaffb65ca8d590d9436 (patch) | |
tree | 80feac0dcf04b687e944a7b1966fb7dcd96fcb1d | |
parent | 759515c26a8aa034b9c3f4b6dfd3b187df48883c (diff) | |
download | busybox-w32-502907f5b33cd10cbe2a2eaffb65ca8d590d9436.tar.gz busybox-w32-502907f5b33cd10cbe2a2eaffb65ca8d590d9436.tar.bz2 busybox-w32-502907f5b33cd10cbe2a2eaffb65ca8d590d9436.zip |
The default behaviour for run-parts is corrected to continue if an error
is encountered in a script.
Patch by Philip Blundell
-rw-r--r-- | libbb/run_parts.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libbb/run_parts.c b/libbb/run_parts.c index 171d93793..0eb766086 100644 --- a/libbb/run_parts.c +++ b/libbb/run_parts.c | |||
@@ -80,7 +80,7 @@ extern int run_parts(char **args, const unsigned char test_mode, char **env) | |||
80 | bb_perror_msg_and_die("failed to stat component %s", filename); | 80 | bb_perror_msg_and_die("failed to stat component %s", filename); |
81 | } | 81 | } |
82 | if (S_ISREG(st.st_mode) && !access(filename, X_OK)) { | 82 | if (S_ISREG(st.st_mode) && !access(filename, X_OK)) { |
83 | if (test_mode & 1) { | 83 | if (test_mode) { |
84 | puts(filename); | 84 | puts(filename); |
85 | } else { | 85 | } else { |
86 | /* exec_errno is common vfork variable */ | 86 | /* exec_errno is common vfork variable */ |
@@ -100,7 +100,8 @@ extern int run_parts(char **args, const unsigned char test_mode, char **env) | |||
100 | waitpid(pid, &result, 0); | 100 | waitpid(pid, &result, 0); |
101 | if(exec_errno) { | 101 | if(exec_errno) { |
102 | errno = exec_errno; | 102 | errno = exec_errno; |
103 | bb_perror_msg_and_die("failed to exec %s", filename); | 103 | bb_perror_msg("failed to exec %s", filename); |
104 | exitstatus = 1; | ||
104 | } | 105 | } |
105 | if (WIFEXITED(result) && WEXITSTATUS(result)) { | 106 | if (WIFEXITED(result) && WEXITSTATUS(result)) { |
106 | bb_perror_msg("%s exited with return code %d", filename, WEXITSTATUS(result)); | 107 | bb_perror_msg("%s exited with return code %d", filename, WEXITSTATUS(result)); |