iptables: convert old-style hook to new-style hook
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
This commit is contained in:
parent
0d5cf75df6
commit
56993a5380
|
@ -16,24 +16,34 @@ endif
|
||||||
IPTABLES_AUTORECONF = YES
|
IPTABLES_AUTORECONF = YES
|
||||||
IPTABLES_LIBTOOL_PATCH = NO
|
IPTABLES_LIBTOOL_PATCH = NO
|
||||||
|
|
||||||
$(eval $(call AUTOTARGETS,package,iptables))
|
define IPTABLES_TARGET_SYMLINK_CREATE
|
||||||
|
|
||||||
$(IPTABLES_HOOK_POST_INSTALL): $(IPTABLES_TARGET_INSTALL_TARGET)
|
|
||||||
ln -sf iptables-multi $(TARGET_DIR)/usr/sbin/iptables
|
ln -sf iptables-multi $(TARGET_DIR)/usr/sbin/iptables
|
||||||
ln -sf iptables-multi $(TARGET_DIR)/usr/sbin/iptables-save
|
ln -sf iptables-multi $(TARGET_DIR)/usr/sbin/iptables-save
|
||||||
ln -sf iptables-multi $(TARGET_DIR)/usr/sbin/iptables-restore
|
ln -sf iptables-multi $(TARGET_DIR)/usr/sbin/iptables-restore
|
||||||
ifeq ($(BR2_INET_IPV6),y)
|
endef
|
||||||
|
|
||||||
|
define IPTABLES_TARGET_IPV6_SYMLINK_CREATE
|
||||||
ln -sf ip6tables-multi $(TARGET_DIR)/usr/sbin/ip6tables
|
ln -sf ip6tables-multi $(TARGET_DIR)/usr/sbin/ip6tables
|
||||||
ln -sf ip6tables-multi $(TARGET_DIR)/usr/sbin/ip6tables-save
|
ln -sf ip6tables-multi $(TARGET_DIR)/usr/sbin/ip6tables-save
|
||||||
ln -sf ip6tables-multi $(TARGET_DIR)/usr/sbin/ip6tables-restore
|
ln -sf ip6tables-multi $(TARGET_DIR)/usr/sbin/ip6tables-restore
|
||||||
else
|
endef
|
||||||
rm -f $(TARGET_DIR)/usr/lib/libip6tc.*
|
|
||||||
endif
|
|
||||||
touch $@
|
|
||||||
|
|
||||||
$(IPTABLES_TARGET_UNINSTALL):
|
define IPTABLES_TARGET_IPV6_REMOVE
|
||||||
$(call MESSAGE,"Uninstalling")
|
rm -f $(TARGET_DIR)/usr/lib/libip6tc.*
|
||||||
|
endef
|
||||||
|
|
||||||
|
IPTABLES_POST_INSTALL_TARGET_HOOKS += IPTABLES_TARGET_SYMLINK_CREATE
|
||||||
|
|
||||||
|
ifeq ($(BR2_INET_IPV6),y)
|
||||||
|
IPTABLES_POST_INSTALL_TARGET_HOOKS += IPTABLES_TARGET_IPV6_SYMLINK_CREATE
|
||||||
|
else
|
||||||
|
IPTABLES_POST_INSTALL_TARGET_HOOKS += IPTABLES_TARGET_IPV6_REMOVE
|
||||||
|
endif
|
||||||
|
|
||||||
|
define IPTABLES_UNINSTALL_TARGET_CMDS
|
||||||
rm -f $(TARGET_DIR)/usr/bin/iptables-xml
|
rm -f $(TARGET_DIR)/usr/bin/iptables-xml
|
||||||
rm -f $(TARGET_DIR)/usr/sbin/iptables* $(TARGET_DIR)/usr/sbin/ip6tables*
|
rm -f $(TARGET_DIR)/usr/sbin/iptables* $(TARGET_DIR)/usr/sbin/ip6tables*
|
||||||
rm -rf $(TARGET_DIR)/usr/lib/xtables
|
rm -rf $(TARGET_DIR)/usr/lib/xtables
|
||||||
rm -f $(IPTABLES_TARGET_INSTALL_TARGET) $(IPTABLES_HOOK_POST_INSTALL)
|
endef
|
||||||
|
|
||||||
|
$(eval $(call AUTOTARGETS,package,iptables))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user