diff options
Diffstat (limited to 'svr-runopts.c')
-rw-r--r-- | svr-runopts.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/svr-runopts.c b/svr-runopts.c index d300834..2f51096 100644 --- a/svr-runopts.c +++ b/svr-runopts.c @@ -75,6 +75,8 @@ static void printhelp(const char * progname) { " Listen on specified tcp port (and optionally address),\n" " up to %d can be specified\n" " (default port is %s if none specified)\n" + "-P PidFile Create pid file PidFile\n" + " (default %s)\n" #ifdef INETD_MODE "-i Start for inetd\n" #endif @@ -88,7 +90,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) { @@ -109,6 +111,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 @@ -189,6 +192,9 @@ void svr_getopts(int argc, char ** argv) { case 'p': nextisport = 1; break; + case 'P': + next = &svr_opts.pidfile; + break; #ifdef DO_MOTD /* motd is displayed by default, -m turns it off */ case 'm': |