Merge Lean's source

This commit is contained in:
CN_SZTL 2019-10-18 12:58:13 +08:00
commit 827295c17f
No known key found for this signature in database
GPG Key ID: 6850B6345C862176
14 changed files with 34 additions and 85 deletions

View File

@ -10,7 +10,7 @@ LUCI_TITLE:=Luci for Docker-CE
LUCI_DEPENDS:=+docker-ce
LUCI_PKGARCH:=all
PKG_VERSION:=1
PKG_RELEASE:=8
PKG_RELEASE:=9
include $(TOPDIR)/feeds/luci/luci.mk

View File

@ -17,30 +17,7 @@ wan_mode = s:option(Flag, "wan_mode", translate("Enable WAN access Dokcer"), tra
wan_mode.default = 0
wan_mode.rmempty = false
o = s:option(Button,"readme",translate("Docker Readme First"))
o.inputtitle = translate("Download DockerReadme.pdf")
o.description = translate("Please download DockerReadme.pdf to read when first-running")
o.inputstyle = "reload"
o.write = function()
Download()
end
function Download()
local t,e
t=nixio.open("/www/DockerReadme.pdf","r")
luci.http.header('Content-Disposition','attachment; filename="DockerReadme.pdf"')
luci.http.prepare_content("application/octet-stream")
while true do
e=t:read(nixio.const.buffersize)
if(not e)or(#e==0)then
break
else
luci.http.write(e)
end
end
t:close()
luci.http.close()
end
o=s:option(DummyValue,"readme",translate(" "))
o.description=translate("<a href=\"../../../../DockerReadme.pdf\" target=\"_blank\" />"..translate("Download DockerReadme.pdf").."</a>")
return m

View File

@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-ssr-plus
PKG_VERSION:=1
PKG_RELEASE:=116
PKG_RELEASE:=117
PKG_CONFIG_DEPENDS:= CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks \
CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_V2ray \

View File

@ -485,18 +485,18 @@ start() {
if rules ;then
start_redir
if ! [ "$(uci_get_by_type global pdnsd_enable)" = "2" ] ;then
mkdir -p /tmp/dnsmasq.d
/usr/share/shadowsocksr/gfw2ipset.sh
mkdir -p /tmp/dnsmasq.d && cp -a /etc/dnsmasq.ssr /tmp/ && cp -a /etc/dnsmasq.oversea /tmp/
if ! [ "$run_mode" = "oversea" ] ;then
cat > /tmp/dnsmasq.d/dnsmasq-ssr.conf <<EOF
conf-dir=/etc/dnsmasq.ssr
conf-dir=/tmp/dnsmasq.ssr
EOF
else
cat > /tmp/dnsmasq.d/dnsmasq-ssr.conf <<EOF
conf-dir=/etc/dnsmasq.oversea
conf-dir=/tmp/dnsmasq.oversea
EOF
fi
/etc/init.d/dnsmasq restart >/dev/null 2>&1
/usr/share/shadowsocksr/gfw2ipset.sh
fi
fi
start_server

View File

@ -1,11 +1,12 @@
#!/bin/sh
awk '!/^$/&&!/^#/{printf("ipset=/.%s/'"gfwlist"'\n",$0)}' /etc/config/gfw.list > /etc/dnsmasq.ssr/custom_forward.conf
awk '!/^$/&&!/^#/{printf("server=/.%s/'"127.0.0.1#5335"'\n",$0)}' /etc/config/gfw.list >> /etc/dnsmasq.ssr/custom_forward.conf
mkdir -p /tmp/dnsmasq.ssr
awk '!/^$/&&!/^#/{printf("ipset=/.%s/'"blacklist"'\n",$0)}' /etc/config/black.list > /etc/dnsmasq.ssr/blacklist_forward.conf
awk '!/^$/&&!/^#/{printf("server=/.%s/'"127.0.0.1#5335"'\n",$0)}' /etc/config/black.list >> /etc/dnsmasq.ssr/blacklist_forward.conf
awk '!/^$/&&!/^#/{printf("ipset=/.%s/'"gfwlist"'\n",$0)}' /etc/config/gfw.list > /tmp/dnsmasq.ssr/custom_forward.conf
awk '!/^$/&&!/^#/{printf("server=/.%s/'"127.0.0.1#5335"'\n",$0)}' /etc/config/gfw.list >> /tmp/dnsmasq.ssr/custom_forward.conf
awk '!/^$/&&!/^#/{printf("ipset=/.%s/'"whitelist"'\n",$0)}' /etc/config/white.list > /etc/dnsmasq.ssr/whitelist_forward.conf
awk '!/^$/&&!/^#/{printf("ipset=/.%s/'"blacklist"'\n",$0)}' /etc/config/black.list > /tmp/dnsmasq.ssr/blacklist_forward.conf
awk '!/^$/&&!/^#/{printf("server=/.%s/'"127.0.0.1#5335"'\n",$0)}' /etc/config/black.list >> /tmp/dnsmasq.ssr/blacklist_forward.conf
awk '!/^$/&&!/^#/{printf("ipset=/.%s/'"whitelist"'\n",$0)}' /etc/config/white.list > /tmp/dnsmasq.ssr/whitelist_forward.conf

View File

@ -8,13 +8,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=fstools
PKG_RELEASE:=1
PKG_RELEASE:=4
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=$(PROJECT_GIT)/project/fstools.git
PKG_SOURCE_DATE:=2019-09-21
PKG_SOURCE_VERSION:=4327ed40d96c95803b2d4d09ddf997c895eea071
PKG_MIRROR_HASH:=34e4510fbf8eb01571e4af632754c2f6799719e1f743037b998ca7fc838e6288
PKG_SOURCE_DATE:=2019-03-28
PKG_SOURCE_VERSION:=ff1ded63c51e84e239fb422ac8b9d15251d1221f
PKG_MIRROR_HASH:=2731bbca42c0eafda557d545ebeca243fa4048c433c3b27d31256aca356886bc
CMAKE_INSTALL:=1
PKG_LICENSE:=GPL-2.0
@ -79,14 +79,14 @@ define Package/block-mount
SECTION:=base
CATEGORY:=Base system
TITLE:=Block device mounting and checking
DEPENDS:=+ubox +libubox +libuci +libblobmsg-json +libjson-c
DEPENDS:=+ubox +libubox +libuci
endef
define Package/blockd
SECTION:=base
CATEGORY:=Base system
TITLE:=Block device automounting
DEPENDS:=+block-mount +fstools +libubus +kmod-fs-autofs4 +libblobmsg-json +libjson-c
DEPENDS:=+block-mount +fstools +libubus +kmod-fs-autofs4
endef
define Package/fstools/install

0
package/system/fstools/files/fstab.default Executable file → Normal file
View File

6
package/system/fstools/files/fstab.init Executable file → Normal file
View File

@ -8,11 +8,7 @@ boot() {
}
start() {
return 0
}
restart() {
return 0
echo "this file has been obsoleted. please call \"/sbin/block mount\" directly"
}
stop() {

0
package/system/fstools/files/media-change.hotplug Executable file → Normal file
View File

0
package/system/fstools/files/mount.hotplug Executable file → Normal file
View File

0
package/system/fstools/files/snapshot Executable file → Normal file
View File

View File

@ -1,11 +0,0 @@
--- a/libblkid-tiny/libblkid-tiny.c
+++ b/libblkid-tiny/libblkid-tiny.c
@@ -282,7 +282,7 @@ int probe_block(char *block, struct blki
mag = &idinfos[i]->magics[0];
- while (mag->magic) {
+ while (mag && mag->magic) {
int off = (mag->kboff * 1024) + mag->sboff;
char magic[32] = { 0 };

View File

@ -1,27 +0,0 @@
--- a/mount_root.c
+++ b/mount_root.c
@@ -101,6 +101,7 @@ stop(int argc, char *argv[1])
static int
done(int argc, char *argv[1])
{
+ int ret;
struct volume *v = volume_find("rootfs_data");
if (!v)
@@ -109,7 +110,15 @@ done(int argc, char *argv[1])
switch (volume_identify(v)) {
case FS_NONE:
case FS_DEADCODE:
- return jffs2_switch(v);
+ ret = jffs2_switch(v);
+ /*
+ * Devices mounted under /mnt will lost their mount point(see switch2jffs())
+ * if the filesystem's(/overlay) state is not FS_STATE_READY,
+ * this action can fix it.
+ */
+ if (!access("/sbin/block", X_OK))
+ system("/sbin/block mount");
+ return ret;
case FS_EXT4:
case FS_F2FS:

View File

@ -0,0 +1,13 @@
diff --git a/libfstools/rootdisk.c b/libfstools/rootdisk.c
index dd00c1b..f3b87fc 100644
--- a/libfstools/rootdisk.c
+++ b/libfstools/rootdisk.c
@@ -270,7 +270,7 @@ static int rootdisk_volume_init(struct volume *v)
if (rootdisk_use_f2fs(p))
snprintf(str, sizeof(str), "mkfs.f2fs -q -l rootfs_data %s", v->blk);
else
- snprintf(str, sizeof(str), "mkfs.ext4 -q -L rootfs_data %s", v->blk);
+ snprintf(str, sizeof(str), "mkfs.ext4 -q -E lazy_itable_init=0,lazy_journal_init=0 -L rootfs_data %s", v->blk);
ret = system(str);
break;
default: