generated from innmonkey/AutoBuild-OpenWrt
-
Notifications
You must be signed in to change notification settings - Fork 18
/
99-default-settings
45 lines (32 loc) · 1.36 KB
/
99-default-settings
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/bin/sh
uci -q get system.@imm_init[0] > "/dev/null" || uci -q add system imm_init > "/dev/null"
if ! uci -q get system.@imm_init[0].lang > "/dev/null"; then
uci -q batch <<-EOF
set luci.main.lang="auto"
commit luci
set system.@imm_init[0].lang="1"
commit system
EOF
fi
uci set fstab.@global[0].anon_mount=1
uci commit fstab
rm -f /usr/lib/lua/luci/view/admin_status/index/mwan.htm
rm -f /usr/lib/lua/luci/view/admin_status/index/upnp.htm
rm -f /usr/lib/lua/luci/view/admin_status/index/linkease.htm
ln -sf /sbin/ip /usr/bin/ip
sed -i 's/root::0:0:99999:7:::/root:$1$V4UetPzk$CYXluq4wUazHjmCDBCqXF.:0:0:99999:7:::/g' /etc/shadow
sed -i '/DISTRIB_REVISION/d' /etc/openwrt_release
echo "DISTRIB_REVISION='v$(date +'%Y.%m')'" >> /etc/openwrt_release
sed -i '/DISTRIB_RELEASE/d' /etc/openwrt_release
echo "DISTRIB_RELEASE='v$(date +'%Y.%m.%d')'" >> /etc/openwrt_release
sed -i '/DISTRIB_DESCRIPTION/d' /etc/openwrt_release
echo "DISTRIB_DESCRIPTION='Build by innmonkey '" >> /etc/openwrt_release
sed -i 's/LuCI openwrt-23.05 branch/ImmortalWrt/g' /usr/lib/lua/luci/version.lua
sed -i '/luciversion/d' /usr/lib/lua/luci/version.lua
echo "luciversion ='23.05'" >> /usr/lib/lua/luci/version.lua
sed -i '/log-facility/d' /etc/dnsmasq.conf
echo "log-facility=/dev/null" >> /etc/dnsmasq.conf
rm -rf /tmp/luci-modulecache/
rm -f /tmp/luci-indexcache
chmod 0755 /etc/init.d/*
exit 0