Fix for Raspberry Pi
- Raspberry Pis (ARM-based) may take some time on boot to initialize network interfaces such as Wi-Fi. Increasing the service restart delay in rc.local from 15 seconds to 60 seconds helps ensure that the VPN is enabled on these network interfaces.
This commit is contained in:
parent
d343401cca
commit
22838b714c
@ -672,10 +672,14 @@ EOF
|
|||||||
else
|
else
|
||||||
echo '#!/bin/sh' > /etc/rc.local
|
echo '#!/bin/sh' > /etc/rc.local
|
||||||
fi
|
fi
|
||||||
cat >> /etc/rc.local <<'EOF'
|
rc_delay=15
|
||||||
|
if uname -m | grep -qi '^arm'; then
|
||||||
|
rc_delay=60
|
||||||
|
fi
|
||||||
|
cat >> /etc/rc.local <<EOF
|
||||||
|
|
||||||
# Added by hwdsl2 VPN script
|
# Added by hwdsl2 VPN script
|
||||||
(sleep 15
|
(sleep $rc_delay
|
||||||
service ipsec restart
|
service ipsec restart
|
||||||
service xl2tpd restart
|
service xl2tpd restart
|
||||||
echo 1 > /proc/sys/net/ipv4/ip_forward)&
|
echo 1 > /proc/sys/net/ipv4/ip_forward)&
|
||||||
|
Loading…
Reference in New Issue
Block a user