This modified varnishncsa init script gives us support for properly logging an x-forwarded-for IP address. The original script is taken from an Ubuntu 14.04.01 machine with Varnish 3.0.5-2.
These are the changes in patch format:
--- /proc/self/fd/11 2014-12-22 17:40:12.102969345 +0100
+++ /proc/self/fd/13 2014-12-22 17:40:12.102969345 +0100
@@ -20,7 +20,8 @@
PIDFILE=/var/run/$NAME/$NAME.pid