update x86 target

This commit is contained in:
gl-luochongjun 2022-08-25 12:12:40 +08:00
parent 3cb8f0ee51
commit d4f240e5b3
2 changed files with 66 additions and 1 deletions

View File

@ -0,0 +1,56 @@
From 8e87492c7eac93999f1dec803a9625b1dec248fd Mon Sep 17 00:00:00 2001
From: gl-luochongjun <luochongjun@gl-inet.com>
Date: Thu, 25 Aug 2022 12:02:03 +0800
Subject: [PATCH] x86 fix default config
---
target/linux/x86/base-files/etc/board.d/01_gl_info | 3 +++
.../etc/{board.d => uci-defaults}/04_gl_firewall | 9 +++++++++
2 files changed, 12 insertions(+)
rename target/linux/x86/base-files/etc/{board.d => uci-defaults}/04_gl_firewall (68%)
diff --git a/target/linux/x86/base-files/etc/board.d/01_gl_info b/target/linux/x86/base-files/etc/board.d/01_gl_info
index a814196b36..b107f878e8 100755
--- a/target/linux/x86/base-files/etc/board.d/01_gl_info
+++ b/target/linux/x86/base-files/etc/board.d/01_gl_info
@@ -2,11 +2,14 @@
#
#
+[ -n "$(uci -q get board_special.hardware.model)" ] && exit 0
+
MAC=$(dd if=/dev/urandom bs=1024 count=1 2>/dev/null | md5sum | sed -e 's/^\(..\)\(..\)\(..\)\(..\)\(..\)\(..\).*$/\1:\2:\3:\4:\5:\6/' -e 's/^\(.\)[13579bdf]/\10/')
SN=$(dd if=/dev/urandom bs=1024 count=1 2>/dev/null | md5sum |cut -c1-16)
SN_BAK=$(dd if=/dev/urandom bs=1024 count=1 2>/dev/null | md5sum |cut -c1-16)
DDNS=$(dd if=/dev/urandom bs=1024 count=1 2>/dev/null | md5sum |cut -c1-7)
+
touch /etc/config/board_special 2>/dev/null
uci -q batch <<-EOF
diff --git a/target/linux/x86/base-files/etc/board.d/04_gl_firewall b/target/linux/x86/base-files/etc/uci-defaults/04_gl_firewall
similarity index 68%
rename from target/linux/x86/base-files/etc/board.d/04_gl_firewall
rename to target/linux/x86/base-files/etc/uci-defaults/04_gl_firewall
index 2a8b9b09cf..991bb538c6 100755
--- a/target/linux/x86/base-files/etc/board.d/04_gl_firewall
+++ b/target/linux/x86/base-files/etc/uci-defaults/04_gl_firewall
@@ -20,6 +20,15 @@ uci -q batch <<-EOF
set firewall.@rule[-1].target='ACCEPT'
set firewall.@rule[-1].enabled='1'
set firewall.@rule[-1].src='wan'
+
+ add firewall rule
+ set firewall.@rule[-1]=rule
+ set firewall.@rule[-1].dest_port='3000'
+ set firewall.@rule[-1].proto='tcp udp'
+ set firewall.@rule[-1].name='AdguardHome'
+ set firewall.@rule[-1].target='ACCEPT'
+ set firewall.@rule[-1].enabled='1'
+ set firewall.@rule[-1].src='wan'
EOF
uci commit firewall
--
2.25.1

View File

@ -3,7 +3,7 @@ description: Add the glinet dependencies
feeds: feeds:
- name: glinet - name: glinet
uri: git@gitlab.com:gl.sdk4.0/gl.router/gl-sdk4-collect.git uri: https://gitlab.com/gl.sdk4.0/gl.router/gl-sdk4-collect.git
branch: v4.1.0 branch: v4.1.0
packages: packages:
@ -16,6 +16,7 @@ packages:
- dnsmasq-full - dnsmasq-full
- mwan3 - mwan3
- iwinfo - iwinfo
- mmc-utils
- block-mount - block-mount
- blkid - blkid
- ntfs-3g - ntfs-3g
@ -24,6 +25,8 @@ packages:
- kmod-fs-ntfs - kmod-fs-ntfs
- kmod-fs-vfat - kmod-fs-vfat
- kmod-fs-exfat - kmod-fs-exfat
- oui-httpd
- oui-librpc
- gl-sdk4-luci - gl-sdk4-luci
- gl-sdk4-rtty - gl-sdk4-rtty
- gl-sdk4-base-files - gl-sdk4-base-files
@ -37,6 +40,9 @@ packages:
- gl-sdk4-carrier-monitor - gl-sdk4-carrier-monitor
- gl-sdk4-init-portal - gl-sdk4-init-portal
- gl-sdk4-s2s - gl-sdk4-s2s
- gl-sdk4-utils
- gl-sdk4-dns
- gl-sdk4-timer
- gl-sdk4-ui-adguardhome - gl-sdk4-ui-adguardhome
- gl-sdk4-ui-adminpw - gl-sdk4-ui-adminpw
@ -71,6 +77,9 @@ packages:
- gl-sdk4-ui-welcome - gl-sdk4-ui-welcome
- gl-sdk4-ui-wgclient - gl-sdk4-ui-wgclient
- gl-sdk4-ui-wgserver - gl-sdk4-ui-wgserver
- gl-sdk4-ui-igmp
- gl-sdk4-ui-overview
- gl-sdk4-ui-timedtask
diffconfig: | diffconfig: |