added iptables build
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
. ./scripts/iw.sh
|
||||
. ./scripts/hostapd.sh
|
||||
. ./scripts/openssl.sh
|
||||
. ./scripts/iptables.sh
|
||||
|
||||
case $1 in
|
||||
build)
|
||||
@@ -48,6 +49,9 @@ case $1 in
|
||||
openssl)
|
||||
openssl
|
||||
;;
|
||||
iptables)
|
||||
iptables
|
||||
;;
|
||||
sdroot_usable)
|
||||
if [ ! -d downloads ]; then
|
||||
download_sources
|
||||
|
||||
@@ -37,4 +37,5 @@ export wpa_supplicant_enable="false"
|
||||
export hostapd_enable="false"
|
||||
export openssl_enable="false"
|
||||
export dnsmasq_enable="true"
|
||||
export iptables_enable="true"
|
||||
#--------------------------------------
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
#!/bin/bash
|
||||
|
||||
. ./scripts/colors.sh
|
||||
. ./scripts/funcs.sh
|
||||
. ./scripts/config.sh
|
||||
|
||||
iptables() {
|
||||
pkgname=iptables
|
||||
pkgver=1.8.11
|
||||
printf "$GREEN** Building and installing $pkgname\n$RESET"
|
||||
[ ! -d $build/$pkgname ] && mkdir $build/$pkgname
|
||||
cd $build/$pkgname
|
||||
tar -xvf $root/downloads/${pkgname}-${pkgver}.tar.xz
|
||||
cd ${pkgname}-${pkgver}
|
||||
./configure \
|
||||
--prefix=/usr \
|
||||
--build=x86_64-pc-linux-gnu \
|
||||
--host=${CROSS_COMPILE} \
|
||||
--disable-nftables \
|
||||
--disable-libnfnetlink \
|
||||
--disable-connlabel
|
||||
check $? "Configure ${pkgname}"
|
||||
make ${makeflags}
|
||||
check $? "Build ${pkgname}"
|
||||
make install DESTDIR=$rootfspath
|
||||
check $? "Install to rootfs ${pkgname}"
|
||||
${CROSS_COMPILE}-strip \
|
||||
$rootfspath/usr/bin/* \
|
||||
$rootfspath/usr/sbin/* \
|
||||
$rootfspath/usr/lib/* \
|
||||
$rootfspath/usr/lib/xtables/*
|
||||
rm -rv $rootfspath/usr/share/man
|
||||
printf "$GREEN** SUCCESS: Building and installing ${pkgname}\n$RESET"
|
||||
}
|
||||
@@ -18,6 +18,7 @@
|
||||
. ./scripts/openssl.sh
|
||||
. ./scripts/hostapd.sh
|
||||
. ./scripts/dnsmasq.sh
|
||||
. ./scripts/iptables.sh
|
||||
|
||||
#----------- Building rootfs ----------------------
|
||||
rootfs() {
|
||||
@@ -62,6 +63,7 @@ rootfs() {
|
||||
[ "$libnl_enable" = "true" ] && libnl
|
||||
[ "$iw_enable" = "true" ] && iw
|
||||
[ "$hostapd_enable" = "true" ] && hostapd
|
||||
[ "$iptables_enable" = "true" ] && iptables
|
||||
|
||||
chmod 640 $rootfspath/etc/shadow $rootfspath/etc/inittab
|
||||
chmod 755 $rootfspath/etc/init.d/* $rootfspath/usr/share/udhcpc/default.script $rootfspath/init
|
||||
|
||||
Reference in New Issue
Block a user