added shorewall from #2553
git-svn-id: svn://svn.openwrt.org/openwrt/packages@9353 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
62d28a7d89
commit
64eff5b3d8
52
net/shorewall-common/Makefile
Normal file
52
net/shorewall-common/Makefile
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
#
|
||||||
|
# Copyright (C) 2006 OpenWrt.org
|
||||||
|
#
|
||||||
|
# This is free software, licensed under the GNU General Public License v2.
|
||||||
|
# See /LICENSE for more information.
|
||||||
|
#
|
||||||
|
# $Id: Makefile 7845 2007-07-01 23:09:45Z florian $
|
||||||
|
|
||||||
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
|
PKG_NAME:=shorewall-common
|
||||||
|
PKG_VERSION:=4.0.4
|
||||||
|
PKG_RELEASE:=1
|
||||||
|
PKG_MD5SUM:=70e32b1dcd56f0bbd3599ff5d9246217
|
||||||
|
|
||||||
|
PKG_SOURCE_URL:=http://www1.shorewall.net/pub/shorewall/4.0/shorewall-$(PKG_VERSION)/
|
||||||
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz
|
||||||
|
|
||||||
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
define Package/shorewall-common
|
||||||
|
SECTION:=net
|
||||||
|
CATEGORY:=Network
|
||||||
|
DEPENDS:=+shorewall-shell
|
||||||
|
TITLE:=Shorewall
|
||||||
|
URL:=http://www.shorewall.net/
|
||||||
|
SUBMENU:=firewall
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/shorewall-common/description
|
||||||
|
Shorewall Firewall is an iptables-based firewall for Linux.
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Build/Compile
|
||||||
|
rm -rf $(PKG_INSTALL_DIR)
|
||||||
|
mkdir -p $(PKG_INSTALL_DIR)
|
||||||
|
PREFIX=$(PKG_INSTALL_DIR) $(PKG_BUILD_DIR)/install.sh
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/shorewall-common/install
|
||||||
|
$(INSTALL_DIR) $(1)/sbin
|
||||||
|
$(INSTALL_DIR) $(1)/etc/init.d
|
||||||
|
$(INSTALL_DIR) $(1)/usr/share
|
||||||
|
$(INSTALL_DIR) $(1)/bin
|
||||||
|
$(INSTALL_BIN) ./files/shorewall.init $(1)/etc/init.d/shorewall
|
||||||
|
$(INSTALL_BIN) ./files/hostname $(1)/bin
|
||||||
|
$(CP) $(PKG_INSTALL_DIR)/sbin/shorewall $(1)/sbin
|
||||||
|
$(CP) $(PKG_INSTALL_DIR)/usr/share/shorewall $(1)/usr/share
|
||||||
|
$(CP) $(PKG_INSTALL_DIR)/etc/shorewall $(1)/etc
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call BuildPackage,shorewall-common))
|
8
net/shorewall-common/files/hostname
Normal file
8
net/shorewall-common/files/hostname
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
. /etc/functions.sh
|
||||||
|
config_load "system"
|
||||||
|
local section="cfg1"
|
||||||
|
config_get "hostname" "$section" "hostname"
|
||||||
|
|
||||||
|
echo "$hostname"
|
31
net/shorewall-common/files/shorewall.init
Normal file
31
net/shorewall-common/files/shorewall.init
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
#!/bin/sh /etc/rc.common
|
||||||
|
|
||||||
|
START=46
|
||||||
|
start() {
|
||||||
|
touch /var/log/messages
|
||||||
|
mkdir -p /var/lock/subsys
|
||||||
|
/sbin/shorewall -f start 1>/dev/null &
|
||||||
|
}
|
||||||
|
|
||||||
|
stop() {
|
||||||
|
/sbin/shorewall stop 1>/dev/null
|
||||||
|
}
|
||||||
|
|
||||||
|
restart() {
|
||||||
|
if [ -f /var/lib/shorewall/restore ] ; then
|
||||||
|
/sbin/shorewall restore
|
||||||
|
else
|
||||||
|
/sbin/shorewall restart 1>/dev/null
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
refresh() {
|
||||||
|
/sbin/shorewall refresh
|
||||||
|
}
|
||||||
|
|
||||||
|
check() {
|
||||||
|
/sbin/shorewall check
|
||||||
|
}
|
||||||
|
|
||||||
|
reset() {
|
||||||
|
/sbin/shorewall reset
|
||||||
|
}
|
45
net/shorewall-shell/Makefile
Normal file
45
net/shorewall-shell/Makefile
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
#
|
||||||
|
# Copyright (C) 2006 OpenWrt.org
|
||||||
|
#
|
||||||
|
# This is free software, licensed under the GNU General Public License v2.
|
||||||
|
# See /LICENSE for more information.
|
||||||
|
#
|
||||||
|
# $Id: Makefile 7845 2007-07-01 23:09:45Z florian $
|
||||||
|
|
||||||
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
|
PKG_NAME:=shorewall-shell
|
||||||
|
PKG_VERSION:=4.0.4
|
||||||
|
PKG_RELEASE:=1
|
||||||
|
PKG_MD5SUM:=1b1a4101e206c3c0e9ae2e3190c8aaf3
|
||||||
|
|
||||||
|
PKG_SOURCE_URL:=http://www1.shorewall.net/pub/shorewall/4.0/shorewall-$(PKG_VERSION)/
|
||||||
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz
|
||||||
|
|
||||||
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
define Package/shorewall-shell
|
||||||
|
SECTION:=net
|
||||||
|
CATEGORY:=Network
|
||||||
|
DEPENDS:=+iptables
|
||||||
|
TITLE:=Shorewall Shell
|
||||||
|
URL:=http://www.shorewall.net/
|
||||||
|
SUBMENU:=firewall
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/shorewall-shell/description
|
||||||
|
Shoreline Firewall shell-based compiler.
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Build/Compile
|
||||||
|
rm -rf $(PKG_INSTALL_DIR)
|
||||||
|
mkdir -p $(PKG_INSTALL_DIR)
|
||||||
|
PREFIX=$(PKG_INSTALL_DIR) $(PKG_BUILD_DIR)/install.sh
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/shorewall-shell/install
|
||||||
|
$(INSTALL_DIR) $(1)/usr/share
|
||||||
|
$(CP) $(PKG_INSTALL_DIR)/usr/share/shorewall-shell $(1)/usr/share
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call BuildPackage,shorewall-shell))
|
Loading…
x
Reference in New Issue
Block a user