Skip to content

Commit

Permalink
daemon-windows: Add users for windows services.
Browse files Browse the repository at this point in the history
Start with ovs-vswitchd and ovsdb-server.

Signed-off-by: Gurucharan Shetty <[email protected]>
  • Loading branch information
shettyg committed Feb 4, 2014
1 parent fda546b commit 42dd41e
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 0 deletions.
6 changes: 6 additions & 0 deletions manpages.mk
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ ovsdb/ovsdb-server.1: \
lib/daemon-syn.man \
lib/daemon.man \
lib/memory-unixctl.man \
lib/service-syn.man \
lib/service.man \
lib/ssl-bootstrap-syn.man \
lib/ssl-bootstrap.man \
lib/ssl-syn.man \
Expand All @@ -56,6 +58,8 @@ lib/coverage-unixctl.man:
lib/daemon-syn.man:
lib/daemon.man:
lib/memory-unixctl.man:
lib/service-syn.man:
lib/service.man:
lib/ssl-bootstrap-syn.man:
lib/ssl-bootstrap.man:
lib/ssl-syn.man:
Expand Down Expand Up @@ -232,6 +236,7 @@ vswitchd/ovs-vswitchd.8: \
lib/coverage-unixctl.man \
lib/daemon.man \
lib/memory-unixctl.man \
lib/service.man \
lib/ssl-bootstrap.man \
lib/ssl.man \
lib/vlog-unixctl.man \
Expand All @@ -245,6 +250,7 @@ lib/common.man:
lib/coverage-unixctl.man:
lib/daemon.man:
lib/memory-unixctl.man:
lib/service.man:
lib/ssl-bootstrap.man:
lib/ssl.man:
lib/vlog-unixctl.man:
Expand Down
3 changes: 3 additions & 0 deletions ovsdb/ovsdb-server.1.in
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ ovsdb\-server \- Open vSwitch database server
[\fB\-\-remote=\fIremote\fR]\&...
[\fB\-\-run=\fIcommand\fR]
.so lib/daemon-syn.man
.so lib/service-syn.man
.so lib/vlog-syn.man
.so lib/ssl-syn.man
.so lib/ssl-bootstrap-syn.man
Expand Down Expand Up @@ -92,6 +93,8 @@ run a single command, e.g.:
\fBovsdb\-server\fR detaches only after it starts listening on all \
configured remotes.
.so lib/daemon.man
.SS "Service Options"
.so lib/service.man
.SS "Logging Options"
.so lib/vlog.man
.SS "Public Key Infrastructure Options"
Expand Down
5 changes: 5 additions & 0 deletions ovsdb/ovsdb-server.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ main(int argc, char *argv[])

proctitle_init(argc, argv);
set_program_name(argv[0]);
service_start(&argc, &argv);
signal(SIGPIPE, SIG_IGN);
process_init();

Expand Down Expand Up @@ -302,6 +303,9 @@ main(int argc, char *argv[])
}
poll_timer_wait_until(status_timer);
poll_block();
if (should_service_stop()) {
exiting = true;
}
}
ovsdb_jsonrpc_server_destroy(jsonrpc);
SHASH_FOR_EACH(node, &all_dbs) {
Expand All @@ -319,6 +323,7 @@ main(int argc, char *argv[])
}
}

service_stop();
return 0;
}

Expand Down
3 changes: 3 additions & 0 deletions vswitchd/ovs-vswitchd.8.in
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,14 @@ only allow privileged users, such as the superuser, to use it.
\fBovs\-vswitchd\fR emits a log message if \fBmlockall()\fR is
unavailable or unsuccessful.
.
.SS "Daemon Options"
.ds DD \
\fBovs\-vswitchd\fR detaches only after it has connected to the \
database, retrieved the initial configuration, and set up that \
configuration.
.so lib/daemon.man
.SS "Service Options"
.so lib/service.man
.SS "Public Key Infrastructure Options"
.so lib/ssl.man
.so lib/ssl-bootstrap.man
Expand Down
5 changes: 5 additions & 0 deletions vswitchd/ovs-vswitchd.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ main(int argc, char *argv[])

proctitle_init(argc, argv);
set_program_name(argv[0]);
service_start(&argc, &argv);
remote = parse_options(argc, argv, &unixctl_path);
signal(SIGPIPE, SIG_IGN);
sighup = signal_register(SIGHUP);
Expand Down Expand Up @@ -127,9 +128,13 @@ main(int argc, char *argv[])
poll_immediate_wake();
}
poll_block();
if (should_service_stop()) {
exiting = true;
}
}
bridge_exit();
unixctl_server_destroy(unixctl);
service_stop();

return 0;
}
Expand Down

0 comments on commit 42dd41e

Please sign in to comment.