Browse Source

Workaround Bash 5.2 bug

bryan 2 years ago
parent
commit
3fd02690a1
2 changed files with 9 additions and 109 deletions
  1. 5 3
      openwrtbuilder
  2. 4 106
      profiles

+ 5 - 3
openwrtbuilder

@@ -7,7 +7,7 @@
 # Apache 2.0 License
 
 # Set default release
-: "${RELEASE:="22.03.0-rc1"}"
+: "${RELEASE:="22.03.1"}"
 
 printHelp() {
     debug "${FUNCNAME[0]}"
@@ -148,7 +148,7 @@ installHostDependencies() {
     echo "Installing dependencies"
     debug "sudo $_pkg_cmd -y install ${_pkg_list[*]}"
     if ! sudo "$_pkg_cmd" -y install "${_pkg_list[@]}" > /dev/null 2>&1; then
-        echo "Warning: Problem installing prerequisites"
+        echo "Warning: Problem installing dependencies"
         return 1
     fi
 }
@@ -383,7 +383,9 @@ main() {
    
     readInput "$@"
 
-    [[ ! -v "$PROFILE"[@] ]] && echo "Profile does not exist" && return 1
+    echo "PROFILE: $PROFILE"
+
+    [[ ! ${!PROFILE@a} = A ]] && echo "Profile does not exist" && return 1
     declare -gn P_ARR="$PROFILE"
     declare _out_prefix
 

+ 4 - 106
profiles

@@ -13,7 +13,8 @@ default_packages="\
 	tar \
 	iperf \
 	bash \
-	rsync " # Leave trailing whitespace
+	rsync \
+	openssh-sftp-server " # Leave trailing whitespace
 
 
 declare -Ag archer
@@ -76,117 +77,13 @@ r2s['packages']="\
 	ethtool"
 
 declare -Ag r4s
-r4s['release']="22.03.0-rc1"
 r4s['profile']="friendlyarm_nanopi-r4s"
 r4s['target']="rockchip/armv8"
 r4s['filesystem']="ext4"
-r4s['repo']="src/gz stangri_repo https://repo.openwrt.melmac.net"
-# fw3 + vpn-policy-routing
-# r4s['packages']="\
-# 	$default_packages \
-# 	luci-app-upnp \
-# 	luci-app-wireguard \
-# 	luci-app-vpn-policy-routing \
-#   vpn-policy-routing \
-# 	-dnsmasq \
-# 	dnsmasq-full \
-# 	luci-app-ddns \
-# 	luci-app-sqm \
-# 	luci-app-statistics \
-# 	collectd-mod-sensors \
-# 	collectd-mod-thermal \
-# 	collectd-mod-conntrack \
-# 	smcroute \
-# 	curl \
-# 	ethtool \
-# 	kmod-ipt-nat6 \
-# 	-firewall4 \
-# 	-nftables \
-# 	-kmod-nft-offload \
-# 	firewall \
-# 	ip6tables \
-# 	iptables \
-# 	kmod-ipt-offload"
-
-# fw3 + pbr
-# r4s['packages']="\
-# 	$default_packages \
-# 	luci-app-upnp \
-# 	luci-app-wireguard \
-# 	luci-app-pbr \
-# 	pbr-ipt \
-# 	-dnsmasq \
-# 	dnsmasq-full \
-# 	luci-app-ddns \
-# 	luci-app-sqm \
-# 	luci-app-statistics \
-# 	collectd-mod-sensors \
-# 	collectd-mod-thermal \
-# 	collectd-mod-conntrack \
-# 	smcroute \
-# 	curl \
-# 	ethtool \
-# 	kmod-ipt-nat6 \
-# 	-firewall4 \
-# 	-nftables \
-# 	-kmod-nft-offload \
-# 	firewall \
-# 	ip6tables \
-# 	iptables \
-# 	kmod-ipt-offload"
-
-# fw3
-# r4s['packages']="\
-# 	$default_packages \
-# 	luci-app-upnp \
-# 	luci-app-wireguard \
-# 	-dnsmasq \
-# 	dnsmasq-full \
-# 	luci-app-ddns \
-# 	luci-app-sqm \
-# 	luci-app-statistics \
-# 	collectd-mod-sensors \
-# 	collectd-mod-thermal \
-# 	collectd-mod-conntrack \
-# 	smcroute \
-# 	curl \
-# 	ethtool \
-# 	kmod-ipt-nat6 \
-# 	-firewall4 \
-# 	-nftables \
-# 	-kmod-nft-offload \
-# 	firewall \
-# 	ip6tables \
-# 	iptables \
-# 	kmod-ipt-offload"
-
-# fw4 + pbr
-# r4s['packages']="\
-# 	$default_packages \
-# 	luci-app-upnp \
-# 	luci-app-wireguard \
-# 	luci-app-pbr \
-# 	pbr-netifd \
-# 	-dnsmasq \
-# 	dnsmasq-full \
-# 	luci-app-ddns \
-# 	luci-app-sqm \
-# 	luci-app-statistics \
-# 	collectd-mod-sensors \
-# 	collectd-mod-thermal \
-# 	collectd-mod-conntrack \
-# 	smcroute \
-# 	curl \
-# 	ethtool \
-# 	kmod-nft-nat6"
-
-# fw4
 r4s['packages']="\
 	$default_packages \
 	luci-app-upnp \
 	luci-app-wireguard \
-	-dnsmasq \
-	dnsmasq-full \
 	luci-app-ddns \
 	luci-app-sqm \
 	luci-app-statistics \
@@ -196,7 +93,8 @@ r4s['packages']="\
 	smcroute \
 	curl \
 	ethtool \
-	kmod-nft-nat6"
+	kmod-tun \
+	ca-bundle"
 
 declare -Ag x5000r
 x5000r['profile']="totolink_x5000r"