diff options
Diffstat (limited to 'networking/udhcp/dhcpd.c')
-rw-r--r-- | networking/udhcp/dhcpd.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/networking/udhcp/dhcpd.c b/networking/udhcp/dhcpd.c index 8cac68195..89f57bfe8 100644 --- a/networking/udhcp/dhcpd.c +++ b/networking/udhcp/dhcpd.c | |||
@@ -51,7 +51,16 @@ int udhcpd_main(int argc, char **argv) | |||
51 | * otherwise NOMMU machines will parse config twice */ | 51 | * otherwise NOMMU machines will parse config twice */ |
52 | read_config(argv[1] ? argv[1] : DHCPD_CONF_FILE); | 52 | read_config(argv[1] ? argv[1] : DHCPD_CONF_FILE); |
53 | 53 | ||
54 | udhcp_make_pidfile(server_config.pidfile); | 54 | /* Make sure fd 0,1,2 are open */ |
55 | bb_sanitize_stdio(); | ||
56 | /* Equivalent of doing a fflush after every \n */ | ||
57 | setlinebuf(stdout); | ||
58 | |||
59 | /* Create pidfile */ | ||
60 | write_pidfile(server_config.pidfile); | ||
61 | /* if (!..) bb_perror_msg("cannot create pidfile %s", pidfile); */ | ||
62 | |||
63 | bb_info_msg("%s (v%s) started", applet_name, BB_VER); | ||
55 | 64 | ||
56 | option = find_option(server_config.options, DHCP_LEASE_TIME); | 65 | option = find_option(server_config.options, DHCP_LEASE_TIME); |
57 | server_config.lease = LEASE_TIME; | 66 | server_config.lease = LEASE_TIME; |
@@ -72,7 +81,7 @@ int udhcpd_main(int argc, char **argv) | |||
72 | read_leases(server_config.lease_file); | 81 | read_leases(server_config.lease_file); |
73 | 82 | ||
74 | if (read_interface(server_config.interface, &server_config.ifindex, | 83 | if (read_interface(server_config.interface, &server_config.ifindex, |
75 | &server_config.server, server_config.arp) < 0) { | 84 | &server_config.server, server_config.arp)) { |
76 | retval = 1; | 85 | retval = 1; |
77 | goto ret; | 86 | goto ret; |
78 | } | 87 | } |