summaryrefslogtreecommitdiff
path: root/libbb
diff options
context:
space:
mode:
authorRon Yorston2016-06-07 10:26:24 +0100
committerDenys Vlasenko2016-06-18 19:15:20 +0200
commitba12081a9e9b2d90d1924546bc9097abf52cf2b5 (patch)
tree53196419f5e93639a8ea085b1c80214dc2296f37 /libbb
parente4caf1dd9ce8569371a0eeb77ccf02a572dc0f11 (diff)
downloadbusybox-ba12081a9e9b2d90d1924546bc9097abf52cf2b5.zip
busybox-ba12081a9e9b2d90d1924546bc9097abf52cf2b5.tar.gz
Allow "busybox <applet>" to work when busybox is disabled
A recent commit made it possible to disable BusyBox's --install and --list options. However it also stopped "busybox <applet> <params>" from working. Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'libbb')
-rw-r--r--libbb/appletlib.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libbb/appletlib.c b/libbb/appletlib.c
index 281123c..b6fe1da 100644
--- a/libbb/appletlib.c
+++ b/libbb/appletlib.c
@@ -956,6 +956,10 @@ int main(int argc UNUSED_PARAM, char **argv)
#else
lbb_prepare("busybox" IF_FEATURE_INDIVIDUAL(, argv));
+#if !ENABLE_BUSYBOX
+ if (argv[1] && is_prefixed_with(bb_basename(argv[0]), "busybox"))
+ argv++;
+#endif
applet_name = argv[0];
if (applet_name[0] == '-')
applet_name++;