diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2017-04-06 13:45:00 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2017-04-06 13:45:00 +0200 |
commit | 0d6e3ad663adc327597f07fdcabd6ac545864d41 (patch) | |
tree | 92834b3c103b0507289538ae376ee3db9bfbf11b | |
parent | 803c85a20710b8d9026775f5668237fff496dc1e (diff) | |
download | busybox-w32-0d6e3ad663adc327597f07fdcabd6ac545864d41.tar.gz busybox-w32-0d6e3ad663adc327597f07fdcabd6ac545864d41.tar.bz2 busybox-w32-0d6e3ad663adc327597f07fdcabd6ac545864d41.zip |
modprobe-small: fix "modprobe non-existing-module" exitcode (should be 1)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | modutils/modprobe-small.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/modutils/modprobe-small.c b/modutils/modprobe-small.c index 0c0fe8d5d..1285783d0 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) | |||
765 | 765 | ||
766 | if (!infovec) { | 766 | if (!infovec) { |
767 | /* both dirscan and find_alias found nothing */ | 767 | /* both dirscan and find_alias found nothing */ |
768 | if (!is_remove && !is_depmod) /* it wasn't rmmod or depmod */ | 768 | if (!is_remove && !is_depmod) { /* it wasn't rmmod or depmod */ |
769 | bb_error_msg("module '%s' not found", name); | 769 | bb_error_msg("module '%s' not found", name); |
770 | //TODO: _and_die()? or should we continue (un)loading modules listed on cmdline? | 770 | //TODO: _and_die()? or should we continue (un)loading modules listed on cmdline? |
771 | /* "modprobe non-existing-module; echo $?" must print 1 */ | ||
772 | exitcode = EXIT_FAILURE; | ||
773 | } | ||
771 | goto ret; | 774 | goto ret; |
772 | } | 775 | } |
773 | 776 | ||