fatal(retval, "Could not listen for vlog connections");
}
+ die_if_already_running();
daemonize();
VLOG_WARN("OpenFlow reference implementation version %s", VERSION);
static struct option long_options[] = {
{"accept-vconn", required_argument, 0, OPT_ACCEPT_VCONN},
{"no-resolv-conf", no_argument, 0, OPT_NO_RESOLV_CONF},
- {"fail", required_argument, 0, 'f'},
+ {"fail", required_argument, 0, 'F'},
{"inactivity-probe", required_argument, 0, OPT_INACTIVITY_PROBE},
{"max-idle", required_argument, 0, OPT_MAX_IDLE},
{"max-backoff", required_argument, 0, OPT_MAX_BACKOFF},
{"rate-limit", optional_argument, 0, OPT_RATE_LIMIT},
{"burst-limit", required_argument, 0, OPT_BURST_LIMIT},
{"detach", no_argument, 0, 'D'},
+ {"force", no_argument, 0, 'f'},
{"pidfile", optional_argument, 0, 'P'},
{"verbose", optional_argument, 0, 'v'},
{"help", no_argument, 0, 'h'},
s->update_resolv_conf = false;
break;
- case 'f':
+ case 'F':
if (!strcmp(optarg, "open")) {
s->fail_mode = FAIL_OPEN;
} else if (!strcmp(optarg, "closed")) {
set_pidfile(optarg);
break;
+ case 'f':
+ ignore_existing_pidfile();
+ break;
+
case 'l':
if (s->n_listeners >= MAX_MGMT) {
fatal(0, "-l or --listen may be specified at most %d times",
" --accept-vconn=REGEX accept matching discovered controllers\n"
" --no-resolv-conf do not update /etc/resolv.conf\n"
"\nNetworking options:\n"
- " -f, --fail=open|closed when controller connection fails:\n"
+ " -F, --fail=open|closed when controller connection fails:\n"
" closed: drop all packets\n"
" open (default): act as learning switch\n"
" --inactivity-probe=SECS time between inactivity probes\n"
"\nOther options:\n"
" -D, --detach run in background as daemon\n"
" -P, --pidfile[=FILE] create pidfile (default: %s/secchan.pid)\n"
+ " -f, --force with -P, start even if already running\n"
" -v, --verbose=MODULE[:FACILITY[:LEVEL]] set logging levels\n"
" -v, --verbose set maximum verbosity level\n"
" -h, --help display this help message\n"