X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=wrt-setup-local;h=aabfca3fb5c030be02a9de91f34454fa27399a8f;hb=HEAD;hp=d9f11ab9aac9701ef8dc22ebe50bfd8b8c630add;hpb=d8024901625ccaec69197c28a7c6db34cc7ce616;p=automated-distro-installer diff --git a/wrt-setup-local b/wrt-setup-local index d9f11ab..527e4a8 100755 --- a/wrt-setup-local +++ b/wrt-setup-local @@ -16,7 +16,8 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -f=/usr/local/lib/bash-bear;test -r $f || { echo "error: $0 no $f" >&2;exit 1;}; . $f +set -e; . /usr/local/lib/bash-bear; set +e + usage() { cat < $(date +%s) )); then + if ! (( $(date -r ${f[0]} +%s) + 60*60*24 > $(date +%s) )); then if ! opkg update; then echo "$0: warning: opkg update failed" >&2 fi @@ -157,7 +159,7 @@ pi() { pmirror fi done - if [[ $to_install ]]; then + if (( ${#to_install[@]} >= 1 )); then opkg install ${to_install[@]} fi } @@ -238,7 +240,7 @@ fi if $secrets; then key=${rkey[$h]} fi -: ${key:=pictionary49} +: "${key:=pictionary49}" mask=255.255.0.0 cidr=16 @@ -536,8 +538,7 @@ EOF # option config /etc/openvpn/client.conf # EOF -wgip4=10.3.0.1/24 -wgip6=fdfd::1/64 + wgport=26000 network_restart=false @@ -577,10 +578,10 @@ if $network_restart; then v /etc/init.d/network reload fi -firewall-cedit() { - if $client; then - cedit wific /etc/config/firewall <