summaryrefslogtreecommitdiff
path: root/networking/udhcp/dhcpc.c
diff options
context:
space:
mode:
Diffstat (limited to 'networking/udhcp/dhcpc.c')
-rw-r--r--networking/udhcp/dhcpc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/networking/udhcp/dhcpc.c b/networking/udhcp/dhcpc.c
index 0e89c3cae..7cb1dfe5d 100644
--- a/networking/udhcp/dhcpc.c
+++ b/networking/udhcp/dhcpc.c
@@ -178,6 +178,7 @@ int udhcpc_main(int argc, char **argv)
178 OPT_T = 1 << 15, 178 OPT_T = 1 << 15,
179 OPT_t = 1 << 16, 179 OPT_t = 1 << 16,
180 OPT_v = 1 << 17, 180 OPT_v = 1 << 17,
181 OPT_S = 1 << 18,
181 }; 182 };
182#if ENABLE_GETOPT_LONG 183#if ENABLE_GETOPT_LONG
183 static const char udhcpc_longopts[] ALIGN1 = 184 static const char udhcpc_longopts[] ALIGN1 =
@@ -199,6 +200,7 @@ int udhcpc_main(int argc, char **argv)
199 "timeout\0" Required_argument "T" 200 "timeout\0" Required_argument "T"
200 "version\0" No_argument "v" 201 "version\0" No_argument "v"
201 "retries\0" Required_argument "t" 202 "retries\0" Required_argument "t"
203 "syslog\0" No_argument "S"
202 ; 204 ;
203#endif 205#endif
204 /* Default options. */ 206 /* Default options. */
@@ -213,7 +215,7 @@ int udhcpc_main(int argc, char **argv)
213#if ENABLE_GETOPT_LONG 215#if ENABLE_GETOPT_LONG
214 applet_long_options = udhcpc_longopts; 216 applet_long_options = udhcpc_longopts;
215#endif 217#endif
216 opt = getopt32(argc, argv, "c:CV:fbH:h:F:i:np:qRr:s:T:t:v", 218 opt = getopt32(argc, argv, "c:CV:fbH:h:F:i:np:qRr:s:T:t:vS",
217 &str_c, &str_V, &str_h, &str_h, &str_F, 219 &str_c, &str_V, &str_h, &str_h, &str_F,
218 &client_config.interface, &client_config.pidfile, &str_r, 220 &client_config.interface, &client_config.pidfile, &str_r,
219 &client_config.script, &str_T, &str_t 221 &client_config.script, &str_T, &str_t
@@ -262,7 +264,7 @@ int udhcpc_main(int argc, char **argv)
262 return 0; 264 return 0;
263 } 265 }
264 266
265 if (ENABLE_FEATURE_UDHCP_SYSLOG) { 267 if (opt & OPT_S) {
266 openlog(applet_name, LOG_PID, LOG_LOCAL0); 268 openlog(applet_name, LOG_PID, LOG_LOCAL0);
267 logmode |= LOGMODE_SYSLOG; 269 logmode |= LOGMODE_SYSLOG;
268 } 270 }