Commit 414eca37 authored by Tollef Fog Heen's avatar Tollef Fog Heen

Merge r5524, r5525: Require -d, -b, -f, -S or -T when starting varnishd

Don't allow silent failure when neither of the following options are
specified:  -d, -b, -f, -S or -T

In human terms, this means that it is legal to start varnishd without
a Vcl or backend, but only if you have a CLI channel of some kind.



git-svn-id: http://www.varnish-cache.org/svn/branches/2.1@5624 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent e4913081
......@@ -606,6 +606,12 @@ main(int argc, char * const *argv)
fprintf(stderr, "Only one of -b or -f can be specified\n");
usage();
}
if (S_arg == NULL && T_arg == NULL && d_flag == 0 && b_arg == NULL &&
f_arg == NULL) {
fprintf(stderr,
"At least one of -d, -b, -f, -S or -T must be specified\n");
usage();
}
if (f_arg != NULL) {
vcl = vreadfile(f_arg);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment