proftpd: remove UseIPv6 option from sample config if built without IPv6
authorPeter Korsgaard <jacmet@sunsite.dk>
Fri, 22 Apr 2011 11:27:14 +0000 (13:27 +0200)
committerPeter Korsgaard <jacmet@sunsite.dk>
Fri, 22 Apr 2011 11:38:17 +0000 (13:38 +0200)
proftpd refuses to start if it finds a UseIPv6 option in the configuration
file (even if set to off) when built without IPv6 support, so comment out
line.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
package/proftpd/proftpd.mk

index 191f611497b6b4f2a2363dbe219e133b0438bbfd..75ab930ff6db0e827061aaa66ab963b12b605366 100644 (file)
@@ -31,6 +31,7 @@ define PROFTPD_INSTALL_TARGET_CMDS
        $(INSTALL) -D -m 0755 $(@D)/proftpd $(TARGET_DIR)/usr/sbin/proftpd
        @if [ ! -f $(TARGET_DIR)/etc/proftpd.conf ]; then \
                $(INSTALL) -m 0644 -D $(@D)/sample-configurations/basic.conf $(TARGET_DIR)/etc/proftpd.conf; \
+               $(if $(BR2_INET_IPV6),,$(SED) 's/^UseIPv6/# UseIPv6/' $(TARGET_DIR)/etc/proftpd.conf;) \
        fi
        $(INSTALL) -m 0755 package/proftpd/S50proftpd $(TARGET_DIR)/etc/init.d
 endef