aboutsummaryrefslogtreecommitdiff
path: root/applets
diff options
context:
space:
mode:
Diffstat (limited to 'applets')
-rw-r--r--applets/applets.c20
1 files changed, 6 insertions, 14 deletions
diff --git a/applets/applets.c b/applets/applets.c
index bd3704394..f34124252 100644
--- a/applets/applets.c
+++ b/applets/applets.c
@@ -577,21 +577,13 @@ static int busybox_main(char **argv)
577 } 577 }
578 578
579 if (ENABLE_FEATURE_INSTALLER && strcmp(argv[1], "--install") == 0) { 579 if (ENABLE_FEATURE_INSTALLER && strcmp(argv[1], "--install") == 0) {
580 int use_symbolic_links = 0; 580 const char *busybox;
581 char *busybox; 581 busybox = xmalloc_readlink_or_warn(bb_busybox_exec_path);
582
583 /* to use symlinks, or not to use symlinks... */
584 if (argv[2])
585 if (strcmp(argv[2], "-s") == 0)
586 use_symbolic_links = 1;
587
588 /* link */
589 busybox = xmalloc_readlink_or_warn("/proc/self/exe");
590 if (!busybox) 582 if (!busybox)
591 return 1; 583 busybox = bb_busybox_exec_path;
592 install_links(busybox, use_symbolic_links); 584 /* -s makes symlinks */
593 if (ENABLE_FEATURE_CLEAN_UP) 585 install_links(busybox,
594 free(busybox); 586 argv[2] && strcmp(argv[2], "-s") == 0);
595 return 0; 587 return 0;
596 } 588 }
597 589