summaryrefslogtreecommitdiff
path: root/modutils
diff options
context:
space:
mode:
authorDenys Vlasenko2017-04-06 13:45:00 +0200
committerDenys Vlasenko2017-04-06 13:45:00 +0200
commit0d6e3ad663adc327597f07fdcabd6ac545864d41 (patch)
tree92834b3c103b0507289538ae376ee3db9bfbf11b /modutils
parent803c85a20710b8d9026775f5668237fff496dc1e (diff)
downloadbusybox-0d6e3ad663adc327597f07fdcabd6ac545864d41.zip
busybox-0d6e3ad663adc327597f07fdcabd6ac545864d41.tar.gz
modprobe-small: fix "modprobe non-existing-module" exitcode (should be 1)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'modutils')
-rw-r--r--modutils/modprobe-small.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/modutils/modprobe-small.c b/modutils/modprobe-small.c
index 0c0fe8d..1285783 100644
--- a/modutils/modprobe-small.c
+++ b/modutils/modprobe-small.c
@@ -765,9 +765,12 @@ static int process_module(char *name, const char *cmdline_options)
if (!infovec) {
/* both dirscan and find_alias found nothing */
- if (!is_remove && !is_depmod) /* it wasn't rmmod or depmod */
+ if (!is_remove && !is_depmod) { /* it wasn't rmmod or depmod */
bb_error_msg("module '%s' not found", name);
//TODO: _and_die()? or should we continue (un)loading modules listed on cmdline?
+ /* "modprobe non-existing-module; echo $?" must print 1 */
+ exitcode = EXIT_FAILURE;
+ }
goto ret;
}