Russ Dill | 61fb489 | 2002-10-14 21:41:28 +0000 | [diff] [blame] | 1 | #include <string.h> |
| 2 | |
| 3 | extern int udhcpd_main(int argc, char *argv[]); |
| 4 | extern int udhcpc_main(int argc, char *argv[]); |
| 5 | |
| 6 | int main(int argc, char *argv[]) |
| 7 | { |
| 8 | int ret = 0; |
| 9 | char *base = strrchr(argv[0], '/'); |
Eric Andersen | c7bda1c | 2004-03-15 08:29:22 +0000 | [diff] [blame] | 10 | |
Russ Dill | 61fb489 | 2002-10-14 21:41:28 +0000 | [diff] [blame] | 11 | if (strstr(base ? (base + 1) : argv[0], "dhcpd")) |
| 12 | ret = udhcpd_main(argc, argv); |
| 13 | else ret = udhcpc_main(argc, argv); |
Eric Andersen | c7bda1c | 2004-03-15 08:29:22 +0000 | [diff] [blame] | 14 | |
Russ Dill | 61fb489 | 2002-10-14 21:41:28 +0000 | [diff] [blame] | 15 | return ret; |
| 16 | } |