.IP "\fB\-\-dry\-run\fR"
Prevents \fBovs\-vsctl\fR from actually modifying the database.
.
+.IP "\fB-t \fIsecs\fR"
+.IQ "\fB--timeout=\fIsecs\fR"
+Limits runtime to approximately \fIsecs\fR seconds. If the timeout
+expires, \fBovs\-vsctl\fR will exit with a \fBSIGALRM\fR signal.
+(This would normally happen only if the database cannot be contacted.)
+.
.so lib/vlog.man
.
.SH COMMANDS
{"no-wait", no_argument, 0, OPT_NO_WAIT},
{"dry-run", no_argument, 0, OPT_DRY_RUN},
{"oneline", no_argument, 0, OPT_ONELINE},
+ {"timeout", required_argument, 0, 't'},
{"verbose", optional_argument, 0, 'v'},
{"help", no_argument, 0, 'h'},
{"version", no_argument, 0, 'V'},
{0, 0, 0, 0},
};
+
for (;;) {
+ unsigned long int timeout;
int c;
- c = getopt_long(argc, argv, "+v::hV", long_options, NULL);
+ c = getopt_long(argc, argv, "+v::hVt:", long_options, NULL);
if (c == -1) {
break;
}
OVS_PRINT_VERSION(0, 0);
exit(EXIT_SUCCESS);
+ case 't':
+ timeout = strtoul(optarg, NULL, 10);
+ if (timeout <= 0) {
+ ovs_fatal(0, "value %s on -t or --timeout is not at least 1",
+ optarg);
+ } else {
+ time_alarm(timeout);
+ }
+ break;
+
case 'v':
vlog_set_verbosity(optarg);
break;