Merge pull request #1026 from fixl/fix-2.92-memory-issue

Fix 2.92 memory issue in armhf image
This commit is contained in:
Kristian Haugene
2020-02-02 20:04:28 +01:00
committed by GitHub
2 changed files with 5 additions and 5 deletions

View File

@@ -1,4 +1,4 @@
ARG base_image=balenalib/raspberry-pi:stretch
ARG base_image=balenalib/raspberry-pi:buster
FROM $base_image
# For building on x86 machines. CircleCI un-comments before building
@@ -133,4 +133,4 @@ EXPOSE 9091
CMD ["dumb-init", "/etc/openvpn/start.sh"]
# For building on x86 machines. CircleCI un-comments before building
#RUN [ "cross-build-end" ]
#RUN [ "cross-build-end" ]

View File

@@ -125,10 +125,10 @@ TRANSMISSION_CONTROL_OPTS="--script-security 2 --up-delay --up /etc/openvpn/tunn
## If we use UFW or the LOCAL_NETWORK we need to grab network config info
if [[ "${ENABLE_UFW,,}" == "true" ]] || [[ -n "${LOCAL_NETWORK-}" ]]; then
eval $(/sbin/ip r l m 0.0.0.0 | awk '{if($5!="tun0"){print "GW="$3"\nINT="$5; exit}}')
eval $(/sbin/ip route list match 0.0.0.0 | awk '{if($5!="tun0"){print "GW="$3"\nINT="$5; exit}}')
## IF we use UFW_ALLOW_GW_NET along with ENABLE_UFW we need to know what our netmask CIDR is
if [[ "${ENABLE_UFW,,}" == "true" ]] && [[ "${UFW_ALLOW_GW_NET,,}" == "true" ]]; then
eval $(ip r l dev ${INT} | awk '{if($5=="link"){print "GW_CIDR="$1; exit}}')
eval $(/sbin/ip route list dev ${INT} | awk '{if($5=="link"){print "GW_CIDR="$1; exit}}')
fi
fi
@@ -197,7 +197,7 @@ if [[ -n "${LOCAL_NETWORK-}" ]]; then
if [[ -n "${GW-}" ]] && [[ -n "${INT-}" ]]; then
for localNet in ${LOCAL_NETWORK//,/ }; do
echo "adding route to local network ${localNet} via ${GW} dev ${INT}"
/sbin/ip r a "${localNet}" via "${GW}" dev "${INT}"
/sbin/ip route add "${localNet}" via "${GW}" dev "${INT}"
if [[ "${ENABLE_UFW,,}" == "true" ]]; then
ufwAllowPortLong TRANSMISSION_RPC_PORT localNet
if [[ -n "${UFW_EXTRA_PORTS-}" ]]; then