diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2007-06-08 15:02:55 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2007-06-08 15:02:55 +0000 |
commit | bdbbb7ec49040563628758a2581a5f8e44f53277 (patch) | |
tree | 040fdad2cf7f793717c7088c24047b654732541b /libbb | |
parent | c14d39e83a7f55ab9b92e98673a281fd6565c32d (diff) | |
download | busybox-w32-bdbbb7ec49040563628758a2581a5f8e44f53277.tar.gz busybox-w32-bdbbb7ec49040563628758a2581a5f8e44f53277.tar.bz2 busybox-w32-bdbbb7ec49040563628758a2581a5f8e44f53277.zip |
make busybox --install work even if /proc/self/exe doesn't exist
# size busybox_old busybox_unstripped
text data bss dec hex filename
680095 2704 15648 698447 aa84f busybox_old
680099 2704 15648 698451 aa853 busybox_unstripped
Diffstat (limited to 'libbb')
-rw-r--r-- | libbb/execable.c | 2 | ||||
-rw-r--r-- | libbb/messages.c | 3 | ||||
-rw-r--r-- | libbb/vfork_daemon_rexec.c | 4 |
3 files changed, 5 insertions, 4 deletions
diff --git a/libbb/execable.c b/libbb/execable.c index d84364753..f679108be 100644 --- a/libbb/execable.c +++ b/libbb/execable.c | |||
@@ -65,7 +65,7 @@ int exists_execable(const char *filename) | |||
65 | */ | 65 | */ |
66 | int bb_execvp(const char *file, char *const argv[]) | 66 | int bb_execvp(const char *file, char *const argv[]) |
67 | { | 67 | { |
68 | return execvp(find_applet_by_name(file) ? CONFIG_BUSYBOX_EXEC_PATH : file, | 68 | return execvp(find_applet_by_name(file) ? bb_busybox_exec_path : file, |
69 | argv); | 69 | argv); |
70 | } | 70 | } |
71 | #endif | 71 | #endif |
diff --git a/libbb/messages.c b/libbb/messages.c index fbd882c43..16aaea553 100644 --- a/libbb/messages.c +++ b/libbb/messages.c | |||
@@ -37,8 +37,9 @@ const char bb_path_gshadow_file[] = "/etc/gshadow"; | |||
37 | const char bb_path_nologin_file[] = "/etc/nologin"; | 37 | const char bb_path_nologin_file[] = "/etc/nologin"; |
38 | const char bb_path_securetty_file[] = "/etc/securetty"; | 38 | const char bb_path_securetty_file[] = "/etc/securetty"; |
39 | const char bb_path_motd_file[] = "/etc/motd"; | 39 | const char bb_path_motd_file[] = "/etc/motd"; |
40 | const char bb_default_login_shell[] = LIBBB_DEFAULT_LOGIN_SHELL; | ||
41 | const char bb_dev_null[] = "/dev/null"; | 40 | const char bb_dev_null[] = "/dev/null"; |
41 | const char bb_busybox_exec_path[] = CONFIG_BUSYBOX_EXEC_PATH; | ||
42 | const char bb_default_login_shell[] = LIBBB_DEFAULT_LOGIN_SHELL; | ||
42 | 43 | ||
43 | const int const_int_0; | 44 | const int const_int_0; |
44 | const int const_int_1 = 1; | 45 | const int const_int_1 = 1; |
diff --git a/libbb/vfork_daemon_rexec.c b/libbb/vfork_daemon_rexec.c index 349628796..cb4dee799 100644 --- a/libbb/vfork_daemon_rexec.c +++ b/libbb/vfork_daemon_rexec.c | |||
@@ -220,8 +220,8 @@ void forkexit_or_rexec(char **argv) | |||
220 | /* high-order bit of first char in argv[0] is a hidden | 220 | /* high-order bit of first char in argv[0] is a hidden |
221 | * "we have (alrealy) re-execed, don't do it again" flag */ | 221 | * "we have (alrealy) re-execed, don't do it again" flag */ |
222 | argv[0][0] |= 0x80; | 222 | argv[0][0] |= 0x80; |
223 | execv(CONFIG_BUSYBOX_EXEC_PATH, argv); | 223 | execv(bb_busybox_exec_path, argv); |
224 | bb_perror_msg_and_die("exec %s", CONFIG_BUSYBOX_EXEC_PATH); | 224 | bb_perror_msg_and_die("exec %s", bb_busybox_exec_path); |
225 | } | 225 | } |
226 | #else | 226 | #else |
227 | /* Dance around (void)...*/ | 227 | /* Dance around (void)...*/ |