r5524 - trunk/varnish-cache/bin/varnishd

phk at varnish-cache.org phk at varnish-cache.org
Tue Nov 9 10:00:32 CET 2010


Author: phk
Date: 2010-11-09 10:00:32 +0100 (Tue, 09 Nov 2010)
New Revision: 5524

Modified:
   trunk/varnish-cache/bin/varnishd/varnishd.c
Log:
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.



Modified: trunk/varnish-cache/bin/varnishd/varnishd.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/varnishd.c	2010-11-09 08:47:02 UTC (rev 5523)
+++ trunk/varnish-cache/bin/varnishd/varnishd.c	2010-11-09 09:00:32 UTC (rev 5524)
@@ -539,6 +539,10 @@
 	if (b_arg != NULL && f_arg != NULL) {
 		fprintf(stderr, "Only one of -b or -f can be specified\n");
 		usage();
+	} else if (S_arg == NULL && T_arg == NULL) {
+		fprintf(stderr,
+		    "At least one of -d, -b, -f, -S or -T must be specified\n");
+		usage();
 	}
 
 	if (f_arg != NULL) {




More information about the varnish-commit mailing list