bb_perror_msg("remove '%s'", name);
goto ret;
}
- /* N.B. we do not stop here -
+
+ if (applet_name[0] == 'r') {
+ /* rmmod: do not remove dependencies, exit */
+ goto ret;
+ }
+
+ /* modprobe -r: we do not stop here -
* continue to unload modules on which the module depends:
* "-r --remove: option causes modprobe to remove a module.
* If the modules it depends on are also unused, modprobe
- * will try to remove them, too." */
+ * will try to remove them, too."
+ */
}
if (!info) {
//usage:#if ENABLE_MODPROBE_SMALL
+//// Note: currently, help system shows modprobe --help text for all aliased cmds
+//// (see APPLET_ODDNAME macro definition).
+//// All other help texts defined below are not used. FIXME?
+
//usage:#define depmod_trivial_usage NOUSAGE_STR
//usage:#define depmod_full_usage ""
//usage:#define insmod_full_usage "\n\n"
//usage: "Load the specified kernel modules into the kernel"
//usage: IF_FEATURE_2_4_MODULES( "\n"
-//usage: "\nOptions:"
//usage: "\n -f Force module to load into the wrong kernel version"
//usage: "\n -k Make module autoclean-able"
//usage: "\n -v Verbose"
//usage: "[-wfa] [MODULE]..."
//usage:#define rmmod_full_usage "\n\n"
//usage: "Unload kernel modules\n"
-//usage: "\nOptions:"
//usage: "\n -w Wait until the module is no longer used"
//usage: "\n -f Force unload"
//usage: "\n -a Remove all unused modules (recursively)"
//usage:#define modprobe_trivial_usage
//usage: "[-qfwrsv] MODULE [symbol=value]..."
//usage:#define modprobe_full_usage "\n\n"
-//usage: "Options:"
-//usage: "\n -r Remove MODULE (stacks) or do autoclean"
+//usage: " -r Remove MODULE (stacks) or do autoclean"
//usage: "\n -q Quiet"
//usage: "\n -v Verbose"
//usage: "\n -f Force"
opt_complementary = "-1";
/* only -q (quiet) and -r (rmmod),
* the rest are accepted and ignored (compat) */
- getopt32(argv, "qrfsvw");
+ getopt32(argv, "qrfsvwb");
argv += optind;
/* are we rmmod? -> simulate modprobe -r */