summaryrefslogtreecommitdiff
path: root/libbb
diff options
context:
space:
mode:
authorGlenn L McGrath2003-08-30 12:27:36 +0000
committerGlenn L McGrath2003-08-30 12:27:36 +0000
commit502907f5b33cd10cbe2a2eaffb65ca8d590d9436 (patch)
tree80feac0dcf04b687e944a7b1966fb7dcd96fcb1d /libbb
parent759515c26a8aa034b9c3f4b6dfd3b187df48883c (diff)
downloadbusybox-502907f5b33cd10cbe2a2eaffb65ca8d590d9436.zip
busybox-502907f5b33cd10cbe2a2eaffb65ca8d590d9436.tar.gz
The default behaviour for run-parts is corrected to continue if an error
is encountered in a script. Patch by Philip Blundell
Diffstat (limited to 'libbb')
-rw-r--r--libbb/run_parts.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libbb/run_parts.c b/libbb/run_parts.c
index 171d937..0eb7660 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)
bb_perror_msg_and_die("failed to stat component %s", filename);
}
if (S_ISREG(st.st_mode) && !access(filename, X_OK)) {
- if (test_mode & 1) {
+ if (test_mode) {
puts(filename);
} else {
/* exec_errno is common vfork variable */
@@ -100,7 +100,8 @@ extern int run_parts(char **args, const unsigned char test_mode, char **env)
waitpid(pid, &result, 0);
if(exec_errno) {
errno = exec_errno;
- bb_perror_msg_and_die("failed to exec %s", filename);
+ bb_perror_msg("failed to exec %s", filename);
+ exitstatus = 1;
}
if (WIFEXITED(result) && WEXITSTATUS(result)) {
bb_perror_msg("%s exited with return code %d", filename, WEXITSTATUS(result));