Skip to content

Commit 5751cab

Browse files
committed
Add missing lede folder
1 parent dc71bf7 commit 5751cab

File tree

8 files changed

+719
-0
lines changed

8 files changed

+719
-0
lines changed

lede/firehol/Makefile

+163
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,163 @@
1+
include $(TOPDIR)/rules.mk
2+
3+
PKG_NAME:=firehol
4+
PKG_VERSION:=<<VER>>
5+
PKG_RELEASE:=1
6+
7+
PKG_BUILD_DIR:=$(BUILD_DIR)/firehol-$(PKG_VERSION)
8+
PKG_SOURCE:=firehol-$(PKG_VERSION).tar.bz2
9+
PKG_SOURCE_URL:=<<URL>>
10+
PKG_MD5SUM:=<<MD5>>
11+
PKG_CAT:=bzcat
12+
13+
include $(INCLUDE_DIR)/package.mk
14+
15+
define Package/firehol
16+
SECTION:=net
17+
CATEGORY:=Network
18+
PKGARCH=all
19+
DEPENDS:=+bash +ip-full +bash +coreutils-fold +flock \
20+
+grep +ipset +tc \
21+
+kmod-ifb +kmod-sched +kmod-dummy +kmod-sched-connmark \
22+
+iptables-mod-extra +iptables-mod-conntrack-extra \
23+
+iptables-mod-ipopt
24+
TITLE:=firehol and fireqos - firewalling and QOS for humans
25+
URL:=https://firehol.org/
26+
endef
27+
28+
define Package/firehol/description
29+
FireHOL - a firewall for humans
30+
FireQOS - traffic management for humans
31+
Related tools
32+
endef
33+
34+
CONFIGURE_ARGS += \
35+
--disable-doc \
36+
--disable-man \
37+
--disable-firehol-wizard \
38+
--disable-link-balancer \
39+
--disable-update-ipsets \
40+
--disable-vnetbuild
41+
42+
CONFIGURE_VARS += \
43+
IPRANGE_VERSION=1.0.3 \
44+
BASH_VERSION=4 \
45+
BASH_VERSION_PATH=/bin/bash \
46+
47+
# This list generated by inspecting the results of running
48+
# ./configure on an actual openwrt router - there's no point
49+
# in detecting the locations on the build host.
50+
CONFIGURE_VARS += \
51+
BASENAME=/usr/bin/basename \
52+
BRIDGE=x \
53+
CAT=/bin/cat \
54+
CHMOD=/bin/chmod \
55+
CHOWN=/bin/chown \
56+
CP=/bin/cp \
57+
CURL=x \
58+
CUT=/usr/bin/cut \
59+
DATE=/bin/date \
60+
DIFF=x \
61+
DIRNAME=/usr/bin/dirname \
62+
DOT=x \
63+
EGREP=/usr/bin/grep\ -E \
64+
ENV=x \
65+
EXPR=/usr/bin/expr \
66+
FIND=/usr/bin/find \
67+
FLOCK=/usr/bin/flock \
68+
FOLD=/usr/bin/fold \
69+
FUNZIP=x \
70+
JQ=x \
71+
GAWK=/usr/bin/awk \
72+
GIT=x \
73+
GREP=/usr/bin/grep \
74+
HEAD=/usr/bin/head \
75+
HOSTNAME=x \
76+
IP6TABLES=/usr/sbin/ip6tables \
77+
IP6TABLES_RESTORE=/usr/sbin/ip6tables-restore \
78+
IP6TABLES_SAVE=/usr/sbin/ip6tables-save \
79+
IP=/usr/sbin/ip \
80+
IPRANGE=x \
81+
IPSET=/usr/sbin/ipset \
82+
IPTABLES=/usr/sbin/iptables \
83+
IPTABLES_RESTORE=/usr/sbin/iptables-restore \
84+
IPTABLES_SAVE=/usr/sbin/iptables-save \
85+
JQ=x \
86+
LN=x \
87+
LOGGER=/usr/bin/logger \
88+
LS=/bin/ls \
89+
LSMOD=/usr/sbin/lsmod \
90+
MKDIR=/bin/mkdir \
91+
MKTEMP=/bin/mktemp \
92+
MODPROBE=/usr/sbin/modprobe\ -q \
93+
MORE=/usr/bin/less \
94+
MV=/bin/mv \
95+
NEATO=x \
96+
NFACCT=x \
97+
PING6=/bin/ping\ -6 \
98+
PING=/bin/ping \
99+
READLINK=/usr/bin/readlink \
100+
RENICE=: \
101+
RMMOD=/usr/sbin/rmmod \
102+
RM=/bin/rm \
103+
SCREEN=x \
104+
SED=/bin/sed \
105+
SEQ=/usr/bin/seq \
106+
SH=x \
107+
SLEEP=/bin/sleep \
108+
SORT=/usr/bin/sort \
109+
SS=x \
110+
STTY=: \
111+
SYSCTL=/sbin/sysctl \
112+
TAIL=/usr/bin/tail \
113+
TAR=x \
114+
TCPDUMP=/usr/sbin/tcpdump \
115+
TC=/usr/sbin/tc \
116+
TOUCH=/bin/touch \
117+
TPUT=x \
118+
TRACEROUTE=x \
119+
TR=/usr/bin/tr \
120+
UNAME=/bin/uname \
121+
UNIQ=/usr/bin/uniq \
122+
UNZIP=x \
123+
WC=/usr/bin/wc \
124+
WGET=x \
125+
WHOISx= \
126+
ZCAT=/bin/zcat
127+
128+
define Build/Configure
129+
$(call Build/Configure/Default)
130+
endef
131+
132+
define Package/firehol/install
133+
$(INSTALL_DIR) $(1)/usr/lib/firehol/$(PKG_VERSION)
134+
$(INSTALL_BIN) $(PKG_BUILD_DIR)/sbin/firehol $(1)/usr/lib/firehol/$(PKG_VERSION)
135+
$(INSTALL_BIN) $(PKG_BUILD_DIR)/sbin/fireqos $(1)/usr/lib/firehol/$(PKG_VERSION)
136+
$(INSTALL_DATA) $(PKG_BUILD_DIR)/sbin/functions.common $(1)/usr/lib/firehol/$(PKG_VERSION)
137+
$(INSTALL_DATA) $(PKG_BUILD_DIR)/sbin/install.config $(1)/usr/lib/firehol/$(PKG_VERSION)
138+
139+
# Remove any programs that we do not expect to find and change
140+
# the default spool directory to one that will persist, enabling
141+
# the fast startup functionality to work.
142+
$(INSTALL_DIR) $(1)/etc/firehol-spool/
143+
sed -i -e 's/"x"/""/' -e '/FIREHOL_SPOOL_DIR=/s:=.*:=/etc/firehol-spool:' $(1)/usr/lib/firehol/$(PKG_VERSION)/install.config
144+
145+
$(INSTALL_DIR) $(1)/etc/firehol/
146+
$(INSTALL_DIR) $(1)/etc/firehol/services
147+
$(INSTALL_CONF) files/firehol-defaults.conf $(1)/etc/firehol/
148+
$(INSTALL_CONF) files/firehol.conf.example $(1)/etc/firehol/
149+
$(INSTALL_CONF) files/fireqos.conf.example $(1)/etc/firehol/
150+
151+
$(INSTALL_DIR) $(1)/sbin
152+
ln -s /usr/lib/firehol/$(PKG_VERSION)/firehol $(1)/sbin/firehol
153+
ln -s /usr/lib/firehol/$(PKG_VERSION)/fireqos $(1)/sbin/fireqos
154+
155+
$(INSTALL_DIR) $(1)/etc/init.d
156+
$(INSTALL_BIN) files/firehol $(1)/etc/init.d/
157+
$(INSTALL_BIN) files/fireqos $(1)/etc/init.d/
158+
159+
$(INSTALL_DIR) $(1)/etc/hotplug.d/iface/
160+
$(INSTALL_CONF) files/50-qos $(1)/etc/hotplug.d/iface/
161+
endef
162+
163+
$(eval $(call BuildPackage,firehol))

lede/firehol/files/50-qos

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/sh
2+
# Ensure QOS is restarted e.g. if PPP drops and reconnects
3+
[ "$ACTION" = ifup ] && {
4+
test -f /etc/firehol/fireqos.conf && /sbin/fireqos start
5+
}

lede/firehol/files/firehol

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#!/bin/sh /etc/rc.common
2+
3+
# The OpenWRT system uses this to determine start order for links to
4+
# create in /etc/rc.d when you run e.g. /etc/init.d/firehol enable
5+
START=15
6+
7+
start() {
8+
# Prior to FireHOL 3.1.0 we recommended saving a copy of your firewall
9+
# for quick restoration. FireHOL now does this automatically provided
10+
# /etc/firehol/firehol-defaults.conf has preference to restore over
11+
# start: FIREHOL_RESTORE_INSTEAD_OF_START=1
12+
#
13+
# Updates to any files under the config folder /etc/firehol result in a
14+
# full start, with the changes saved automatially for restoring next time.
15+
if [ ! -f /etc/firehol/firehol.conf ]
16+
then
17+
echo "Install /etc/firehol/firehol.conf"
18+
echo " (for an example, see /etc/firehol/firehol.conf.example)"
19+
echo "test it with:"
20+
echo " firehol try"
21+
echo "and then disable the default firewall:"
22+
echo " /etc/init.d/firewall disable"
23+
exit 1
24+
fi
25+
/sbin/firehol start
26+
}
27+
28+
restart() {
29+
/sbin/firehol start
30+
}
31+
32+
reload() {
33+
/sbin/firehol start
34+
}

0 commit comments

Comments
 (0)