summaryrefslogtreecommitdiff
path: root/svr-runopts.c
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2006-06-07 14:10:21 +0000
committerMatt Johnston <matt@ucc.asn.au>2006-06-07 14:10:21 +0000
commit4f3c5eb00cdf74680b2029d5e80938fd57941380 (patch)
treeb7e2bc2e6e97881090ace578e1d3acb173f37cdd /svr-runopts.c
parentf606fe6dee81b9fd71d9d3d29648fb5a143127ea (diff)
downloaddropbear-4f3c5eb00cdf74680b2029d5e80938fd57941380.tar.gz
Add -P pidfile patch from Swen Schillig
Diffstat (limited to 'svr-runopts.c')
-rw-r--r--svr-runopts.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/svr-runopts.c b/svr-runopts.c
index 8d8b8df..784e0ca 100644
--- a/svr-runopts.c
+++ b/svr-runopts.c
@@ -72,6 +72,8 @@ static void printhelp(const char * progname) {
#endif
"-p port Listen on specified tcp port, up to %d can be specified\n"
" (default %s if none specified)\n"
+ "-P PidFile Create pid file PidFile\n"
+ " (default %s)\n"
#ifdef INETD_MODE
"-i Start for inetd\n"
#endif
@@ -85,7 +87,7 @@ static void printhelp(const char * progname) {
#ifdef DROPBEAR_RSA
RSA_PRIV_FILENAME,
#endif
- DROPBEAR_MAX_PORTS, DROPBEAR_DEFPORT);
+ DROPBEAR_MAX_PORTS, DROPBEAR_DEFPORT, DROPBEAR_PIDFILE);
}
void svr_getopts(int argc, char ** argv) {
@@ -105,6 +107,7 @@ void svr_getopts(int argc, char ** argv) {
svr_opts.inetdmode = 0;
svr_opts.portcount = 0;
svr_opts.hostkey = NULL;
+ svr_opts.pidfile = DROPBEAR_PIDFILE;
#ifdef ENABLE_SVR_LOCALTCPFWD
svr_opts.nolocaltcp = 0;
#endif
@@ -185,6 +188,9 @@ void svr_getopts(int argc, char ** argv) {
svr_opts.portcount++;
}
break;
+ case 'P':
+ next = &svr_opts.pidfile;
+ break;
#ifdef DO_MOTD
/* motd is displayed by default, -m turns it off */
case 'm':