This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
. /lib/upgrade/common.sh | |
firmware="/tmp/firmware.img" | |
tmpdir="/tmp/_upgrade" | |
output="/dev/ttyS0" | |
fw_env_config="/etc/fw_env.config" | |
sectorsize="$([ -f "${fw_env_config}" ] && grep "/dev/mtd1 " "${fw_env_config}" | sed -e "s/^\([^ \t]*[ \t]*\)\{4\}.*/\1/g")" | |
if [ -f "/etc/modelname" ]; then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
rootfs_mtd="$(cat /proc/mtd | grep \"rootfs\" | cut -d : -f 1)" | |
rootfs_size="$(($( ( fw_printenv | grep ^rootfs_size= | cut -d = -f 2 ) 2>&- )))" | |
if [ ! -f "/rom/note" -a -n "${rootfs_mtd}" -a ${rootfs_size} -gt 0 ]; then | |
. /lib/functions/boot.sh && | |
umount -l /jffs && | |
pivot /rom /mnt && | |
umount -l /mnt && | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ 0.000000] Linux version 5.4.48 (pi@SDDesk) (gcc version 8.4.0 (OpenWrt GCC 8.4.0 r13342+179-e35e40ad82)) #0 Tue Jun 23 20:20:29 2020 | |
[ 0.000000] printk: bootconsole [early0] enabled | |
[ 0.000000] CPU0 revision is: 0001974c (MIPS 74Kc) | |
[ 0.000000] MIPS: machine is Engenius ENS202EXT | |
[ 0.000000] SoC: Atheros AR9341 rev 1 | |
[ 0.000000] Initrd not found or empty - disabling initrd | |
[ 0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes. | |
[ 0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes | |
[ 0.000000] Zone ranges: | |
[ 0.000000] Normal [mem 0x0000000000000000-0x0000000003ffffff] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ 0.000000] Linux version 4.14.180 (pi@SDDesk) (gcc version 7.5.0 (OpenWrt GCC 7.5.0 r11063-85e04e9f46)) #0 Sat May 16 18:32:20 2020 | |
[ 0.000000] bootconsole [early0] enabled | |
[ 0.000000] CPU0 revision is: 0001974c (MIPS 74Kc) | |
[ 0.000000] MIPS: machine is Engenius ENS202EXT | |
[ 0.000000] SoC: Atheros AR9341 rev 1 | |
[ 0.000000] Determined physical RAM map: | |
[ 0.000000] memory: 04000000 @ 00000000 (usable) | |
[ 0.000000] Initrd not found or empty - disabling initrd | |
[ 0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes. | |
[ 0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# SPDX-License-Identifier: (GPL-2.0-only OR Apache-2.0) | |
""" | |
Windows function key scan codes to ANSI escape code dictionary: | |
Pause/Break, Ctrl+Alt+Del, Ctrl+Alt+arrows not mapable | |
Input: ordinal of char from msvcrt.getch() | |
Output: bytes string of ANSI escape sequence for linux/xterm | |
numerical used over linux specifics for Home and End | |
VT or CSI escape sequences used when linux has no sequence |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CONFIG_MODULES=y | |
CONFIG_HAVE_DOT_CONFIG=y | |
CONFIG_TARGET_ath79=y | |
CONFIG_TARGET_ath79_generic=y | |
CONFIG_TARGET_ath79_generic_DEVICE_tplink_tl-wr710n-v1=y | |
CONFIG_HAS_SUBTARGETS=y | |
CONFIG_HAS_DEVICES=y | |
CONFIG_TARGET_BOARD="ath79" | |
CONFIG_TARGET_SUBTARGET="generic" | |
CONFIG_TARGET_PROFILE="DEVICE_tplink_tl-wr710n-v1" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
PKI_DIR=/etc/easy-rsa/pki | |
CRT_DIR=/etc/easy-rsa/pki/issued | |
KEY_DIR=/etc/easy-rsa/pki/private | |
OUTPUT_DIR=/etc/openvpn | |
BASE_CONFIG=/etc/openvpn/client.confbase | |
cat ${BASE_CONFIG} >> ${OUTPUT_DIR}/${1}.ovpn | |
echo -e '<ca>' | cat >> ${OUTPUT_DIR}/${1}.ovpn | |
cat ${PKI_DIR}/ca.crt >> ${OUTPUT_DIR}/${1}.ovpn |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd /etc/easy-rsa/pki | |
export EASYRSA_PKI="/etc/easy-rsa/pki" | |
export EASYRSA_REQ_CN="organization" | |
easyrsa init-pki | |
easyrsa gen-dh | |
easyrsa build-ca nopass | |
easyrsa build-server-full organization nopass | |
easyrsa build-client-full stream | |
easyrsa build-client-full program |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
client | |
dev tun | |
proto udp | |
remote organization.com 9105 | |
resolv-retry infinite | |
nobind | |
persist-key | |
persist-tun | |
keepalive 10 120 | |
remote-cert-tls server |