summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
authorRuss Allbery <rra@dropbox.com>2016-07-27 15:47:45 -0700
committerRuss Allbery <rra@dropbox.com>2016-07-27 15:47:45 -0700
commit1a0346678f4fee7f1a56fbf7297a6af6a3298d7f (patch)
treeea420470e1a8d71071e3b134a8bd6820fb6d62cf /server
parent2ccd54fc94920c73764140122761150e94f72ef3 (diff)
Add a -v option to remctl-shell
May as well follow the same option pattern as remctld.
Diffstat (limited to 'server')
-rw-r--r--server/remctl-shell.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/server/remctl-shell.c b/server/remctl-shell.c
index 7b288c0..afc6905 100644
--- a/server/remctl-shell.c
+++ b/server/remctl-shell.c
@@ -36,6 +36,7 @@ Options:\n\
-h Display this help\n\
-q Suppress informational logging (such as the command run)\n\
-S Log to standard output/error rather than syslog\n\
+ -v Display the version of remctld\n\
\n\
This is meant to be used as the shell for a dedicated account and handles\n\
incoming commands via ssh. It must be run under ssh or with the same\n\
@@ -128,6 +129,10 @@ main(int argc, char *argv[])
case 'S':
log_stdout = true;
break;
+ case 'v':
+ printf("remctl-shell %s\n", PACKAGE_VERSION);
+ exit(0);
+ break;
default:
warn("unknown option -%c", optopt);
usage(1);