diff --git a/ch-mount.sh b/ch-mount.sh new file mode 100755 index 0000000..2b18ef7 --- /dev/null +++ b/ch-mount.sh @@ -0,0 +1,54 @@ +#!/bin/bash + +SUDO='' + +function mnt() { + echo "MOUNTING" + ${SUDO} mount -t proc /proc ${2}proc || exit + ${SUDO} mount -t sysfs /sys ${2}sys + ${SUDO} mount -o bind /dev ${2}dev + ${SUDO} mount -o bind /dev/pts ${2}dev/pts + ${SUDO} mount -t tmpfs tmpfs ${2}tmp + ${SUDO} mount -t tmpfs tmpfs ${2}mnt + ${SUDO} mount -t tmpfs tmpfs ${2}root + + ${SUDO} mkdir ${2}tmp/lock ${2}tmp/bin + ${SUDO} cp /etc/resolv.conf ${2}tmp/resolv.conf + ${SUDO} cp -a /usr/bin/qemu-aarch64-static ${2}tmp/bin/ + #export PATH=$PATH:${2}tmp/bin + ${SUDO} mount -t binfmt_misc binfmt_misc ${2}proc/sys/fs/binfmt_misc || exit + ${SUDO} sh -c "echo '-1' > ${2}proc/sys/fs/binfmt_misc/qemu-aarch64" + ${SUDO} sh -c "echo ':qemu-aarch64:M:0:\x7f\x45\x4c\x46\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\xb7\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/tmp/bin/qemu-aarch64-static:' > ${2}proc/sys/fs/binfmt_misc/register" + ${SUDO} chroot ${2} +} + +function umnt() { + echo "UNMOUNTING" + ${SUDO} umount ${2}root + ${SUDO} umount ${2}proc/sys/fs/binfmt_misc + ${SUDO} umount ${2}tmp + ${SUDO} umount ${2}mnt + ${SUDO} umount ${2}proc + ${SUDO} umount ${2}sys + ${SUDO} umount ${2}dev/pts + ${SUDO} umount ${2}dev +} +if [ "$1" == "-m" ] && [ -n "$2" ] ; +then + mnt $1 $2 +elif [ "$1" == "-u" ] && [ -n "$2" ]; +then + umnt $1 $2 +else + echo "" + echo "Either 1'st, 2'nd or both parameters were missing" + echo "" + echo "1'st parameter can be one of these: -m(mount) OR -u(umount)" + echo "2'nd parameter is the full path of rootfs directory(with trailing '/')" + echo "" + echo "For example: ch-mount -m /media/sdcard/" + echo "" + echo 1st parameter : ${1} + echo 2nd parameter : ${2} +fi + diff --git a/fix_opkg_status.sh b/fix_opkg_status.sh new file mode 100755 index 0000000..871482a --- /dev/null +++ b/fix_opkg_status.sh @@ -0,0 +1,3 @@ +cat root/usr/lib/opkg/status > /tmp/_tmp_opkg_status || exit +(cat /tmp/_tmp_opkg_status |tr "\n" "#" |sed 's/##/\$/g' |tr "$" "\n" |grep -v "^Package: kmod-" |grep "^Package:" |tr "\n" "$" |sed 's/\$/##/g' |tr -d "\n" |tr "#" "\n" && cat hold_opkg_status ) > root/usr/lib/opkg/status +rm -f /tmp/_tmp_opkg_status \ No newline at end of file diff --git a/hold_opkg_status b/hold_opkg_status new file mode 100644 index 0000000..f5d3fbc --- /dev/null +++ b/hold_opkg_status @@ -0,0 +1,371 @@ +Package: kmod-l2tp +Version: 4.1.7-1 +Depends: kernel (= 4.1.7-1-e6b7dd72522ec3c2353db6b443ccc6d2), kmod-ipv6, kmod-udptunnel4, kmod-udptunnel6 +Status: install hold installed +Architecture: rtd1295 +Installed-Time: 1548323667 + +Package: kmod-rtl8168 +Version: 4.1.7-1 +Depends: kernel (= 4.1.7-1-e6b7dd72522ec3c2353db6b443ccc6d2), kmod-mii +Status: install hold installed +Architecture: rtd1295 +Installed-Time: 1548323667 + +Package: kmod-crypto-manager +Version: 4.1.7-1 +Depends: kernel (= 4.1.7-1-e6b7dd72522ec3c2353db6b443ccc6d2), kmod-crypto-aead, kmod-crypto-hash, kmod-crypto-pcompress, kmod-crypto-core +Status: install hold installed +Architecture: rtd1295 +Installed-Time: 1548323666 +Auto-Installed: yes + +Package: kmod-crypto-pcompress +Version: 4.1.7-1 +Depends: kernel (= 4.1.7-1-e6b7dd72522ec3c2353db6b443ccc6d2), kmod-crypto-core +Status: install hold installed +Architecture: rtd1295 +Installed-Time: 1548323666 +Auto-Installed: yes + +Package: kmod-crypto-hash +Version: 4.1.7-1 +Depends: kernel (= 4.1.7-1-e6b7dd72522ec3c2353db6b443ccc6d2), kmod-crypto-core +Status: install hold installed +Architecture: rtd1295 +Installed-Time: 1548323666 +Auto-Installed: yes + +Package: kmod-crypto-aead +Version: 4.1.7-1 +Depends: kernel (= 4.1.7-1-e6b7dd72522ec3c2353db6b443ccc6d2), kmod-crypto-core +Status: install hold installed +Architecture: rtd1295 +Installed-Time: 1548323666 + +Package: kmod-ufsd +Version: 4.1.7-rtd1295-2 +Depends: kernel (= 4.1.7-1-e6b7dd72522ec3c2353db6b443ccc6d2), libc +Status: install user installed +Architecture: rtd1295 +Installed-Time: 1548323668 + +Package: kmod-md-multipath +Version: 4.1.7-1 +Depends: kernel (= 4.1.7-1-e6b7dd72522ec3c2353db6b443ccc6d2), kmod-md-mod +Status: install hold installed +Architecture: rtd1295 +Installed-Time: 1548323667 + +Package: kmod-lib-crc-ccitt +Version: 4.1.7-1 +Depends: kernel (= 4.1.7-1-e6b7dd72522ec3c2353db6b443ccc6d2) +Status: install hold installed +Architecture: rtd1295 +Installed-Time: 1548323667 + +Package: kmod-fs-nfsd +Version: 4.1.7-1 +Depends: kernel (= 4.1.7-1-e6b7dd72522ec3c2353db6b443ccc6d2), kmod-fs-nfs-common, kmod-fs-exportfs +Status: install hold installed +Architecture: rtd1295 +Installed-Time: 1548323667 + +Package: kmod-md-mod +Version: 4.1.7-1 +Depends: kernel (= 4.1.7-1-e6b7dd72522ec3c2353db6b443ccc6d2) +Status: install hold installed +Architecture: rtd1295 +Installed-Time: 1548323667 +Auto-Installed: yes + +Package: kmod-gre +Version: 4.1.7-1 +Depends: kernel (= 4.1.7-1-e6b7dd72522ec3c2353db6b443ccc6d2), kmod-ipv6, kmod-iptunnel +Status: install hold installed +Architecture: rtd1295 +Installed-Time: 1548323667 + +Package: kmod-md-raid10 +Version: 4.1.7-1 +Depends: kernel (= 4.1.7-1-e6b7dd72522ec3c2353db6b443ccc6d2), kmod-md-mod +Status: install hold installed +Architecture: rtd1295 +Installed-Time: 1548323667 + +Package: kmod-pppoe +Version: 4.1.7-1 +Depends: kernel (= 4.1.7-1-e6b7dd72522ec3c2353db6b443ccc6d2), kmod-ppp, kmod-pppox +Status: install hold installed +Architecture: rtd1295 +Installed-Time: 1548323667 + +Package: kmod-pppox +Version: 4.1.7-1 +Depends: kernel (= 4.1.7-1-e6b7dd72522ec3c2353db6b443ccc6d2), kmod-ppp +Status: install hold installed +Architecture: rtd1295 +Installed-Time: 1548323667 +Auto-Installed: yes + +Package: kmod-crypto-crc32c +Version: 4.1.7-1 +Depends: kernel (= 4.1.7-1-e6b7dd72522ec3c2353db6b443ccc6d2), kmod-crypto-hash, kmod-crypto-core +Status: install hold installed +Architecture: rtd1295 +Installed-Time: 1548323666 + +Package: kmod-lib-xor +Version: 4.1.7-1 +Depends: kernel (= 4.1.7-1-e6b7dd72522ec3c2353db6b443ccc6d2) +Status: install hold installed +Architecture: rtd1295 +Installed-Time: 1548323667 + +Package: kmod-mii +Version: 4.1.7-1 +Depends: kernel (= 4.1.7-1-e6b7dd72522ec3c2353db6b443ccc6d2) +Status: install hold installed +Architecture: rtd1295 +Installed-Time: 1548323667 + +Package: kmod-dm +Version: 4.1.7-1 +Depends: kernel (= 4.1.7-1-e6b7dd72522ec3c2353db6b443ccc6d2), kmod-crypto-manager +Status: install hold installed +Architecture: rtd1295 +Installed-Time: 1548323667 + +Package: kmod-lib-crc32c +Version: 4.1.7-1 +Depends: kernel (= 4.1.7-1-e6b7dd72522ec3c2353db6b443ccc6d2), kmod-crypto-crc32c +Status: install hold installed +Architecture: rtd1295 +Installed-Time: 1548323667 + +Package: kmod-iptunnel +Version: 4.1.7-1 +Depends: kernel (= 4.1.7-1-e6b7dd72522ec3c2353db6b443ccc6d2) +Status: install hold installed +Architecture: rtd1295 +Installed-Time: 1548323667 +Auto-Installed: yes + +Package: kmod-pptp +Version: 4.1.7-1 +Depends: kernel (= 4.1.7-1-e6b7dd72522ec3c2353db6b443ccc6d2), kmod-ppp, kmod-gre, kmod-pppox +Status: install hold installed +Architecture: rtd1295 +Installed-Time: 1548323667 + +Package: kmod-md-linear +Version: 4.1.7-1 +Depends: kernel (= 4.1.7-1-e6b7dd72522ec3c2353db6b443ccc6d2), kmod-md-mod +Status: install hold installed +Architecture: rtd1295 +Installed-Time: 1548323667 + +Package: kmod-udptunnel4 +Version: 4.1.7-1 +Depends: kernel (= 4.1.7-1-e6b7dd72522ec3c2353db6b443ccc6d2) +Status: install hold installed +Architecture: rtd1295 +Installed-Time: 1548323667 +Auto-Installed: yes + +Package: kmod-udptunnel6 +Version: 4.1.7-1 +Depends: kernel (= 4.1.7-1-e6b7dd72522ec3c2353db6b443ccc6d2) +Status: install hold installed +Architecture: rtd1295 +Installed-Time: 1548323667 +Auto-Installed: yes + +Package: kmod-md-raid456 +Version: 4.1.7-1 +Depends: kernel (= 4.1.7-1-e6b7dd72522ec3c2353db6b443ccc6d2), kmod-md-mod, kmod-lib-raid6, kmod-lib-xor +Status: install hold installed +Architecture: rtd1295 +Installed-Time: 1548323667 + +Package: kmod-cryptodev +Version: 4.1.7+1.9.git-2017-05-29-rtd1295-1 +Depends: kernel (= 4.1.7-1-e6b7dd72522ec3c2353db6b443ccc6d2), kmod-crypto-authenc, kmod-crypto-hash +Status: install user installed +Architecture: rtd1295 +Installed-Time: 1548323678 + +Package: kmod-crypto-aes +Version: 4.1.7-1 +Depends: kernel (= 4.1.7-1-e6b7dd72522ec3c2353db6b443ccc6d2), kmod-crypto-core +Status: install hold installed +Architecture: rtd1295 +Installed-Time: 1548323666 + +Package: kmod-crypto-core +Version: 4.1.7-1 +Depends: kernel (= 4.1.7-1-e6b7dd72522ec3c2353db6b443ccc6d2) +Status: install hold installed +Architecture: rtd1295 +Installed-Time: 1548323666 +Auto-Installed: yes + +Package: kmod-crypto-authenc +Version: 4.1.7-1 +Depends: kernel (= 4.1.7-1-e6b7dd72522ec3c2353db6b443ccc6d2), kmod-crypto-manager, kmod-crypto-core +Status: install hold installed +Architecture: rtd1295 +Installed-Time: 1548323666 + +Package: kmod-lib-raid6 +Version: 4.1.7-1 +Depends: kernel (= 4.1.7-1-e6b7dd72522ec3c2353db6b443ccc6d2) +Status: install hold installed +Architecture: rtd1295 +Installed-Time: 1548323667 + +Package: kmod-ata-ahci +Version: 4.1.7-1 +Depends: kernel (= 4.1.7-1-e6b7dd72522ec3c2353db6b443ccc6d2), kmod-ata-core +Status: install hold installed +Architecture: rtd1295 +Installed-Time: 1548323666 + +Package: kmod-dnsresolver +Version: 4.1.7-1 +Depends: kernel (= 4.1.7-1-e6b7dd72522ec3c2353db6b443ccc6d2) +Status: install hold installed +Architecture: rtd1295 +Installed-Time: 1548323667 + +Package: kmod-rtksdmmc +Version: 4.1.7-1 +Depends: kernel (= 4.1.7-1-e6b7dd72522ec3c2353db6b443ccc6d2) +Status: install hold installed +Architecture: rtd1295 +Installed-Time: 1548323667 + +Package: kmod-crypto-ecb +Version: 4.1.7-1 +Depends: kernel (= 4.1.7-1-e6b7dd72522ec3c2353db6b443ccc6d2), kmod-crypto-manager, kmod-crypto-core +Status: install hold installed +Architecture: rtd1295 +Installed-Time: 1548323666 + +Package: kmod-ipv6 +Version: 4.1.7-1 +Depends: kernel (= 4.1.7-1-e6b7dd72522ec3c2353db6b443ccc6d2) +Status: install hold installed +Architecture: rtd1295 +Installed-Time: 1548323667 +Auto-Installed: yes + +Package: kmod-ata-core +Version: 4.1.7-1 +Depends: kernel (= 4.1.7-1-e6b7dd72522ec3c2353db6b443ccc6d2), kmod-scsi-core +Status: install hold installed +Architecture: rtd1295 +Installed-Time: 1548323666 +Auto-Installed: yes + +Package: kmod-ppp +Version: 4.1.7-1 +Depends: kernel (= 4.1.7-1-e6b7dd72522ec3c2353db6b443ccc6d2), kmod-lib-crc-ccitt, kmod-slhc +Status: install hold installed +Architecture: rtd1295 +Installed-Time: 1548323667 +Auto-Installed: yes + +Package: kmod-fs-nfs +Version: 4.1.7-1 +Depends: kernel (= 4.1.7-1-e6b7dd72522ec3c2353db6b443ccc6d2), kmod-fs-nfs-common, kmod-dnsresolver +Status: install hold installed +Architecture: rtd1295 +Installed-Time: 1548323667 + +Package: kmod-md-raid0 +Version: 4.1.7-1 +Depends: kernel (= 4.1.7-1-e6b7dd72522ec3c2353db6b443ccc6d2), kmod-md-mod +Status: install hold installed +Architecture: rtd1295 +Installed-Time: 1548323667 + +Package: kmod-md-raid1 +Version: 4.1.7-1 +Depends: kernel (= 4.1.7-1-e6b7dd72522ec3c2353db6b443ccc6d2), kmod-md-mod +Status: install hold installed +Architecture: rtd1295 +Installed-Time: 1548323667 + +Package: kmod-fs-exportfs +Version: 4.1.7-1 +Depends: kernel (= 4.1.7-1-e6b7dd72522ec3c2353db6b443ccc6d2) +Status: install hold installed +Architecture: rtd1295 +Installed-Time: 1548323667 + +Package: kmod-lib-lzo +Version: 4.1.7-1 +Depends: kernel (= 4.1.7-1-e6b7dd72522ec3c2353db6b443ccc6d2) +Status: install hold installed +Architecture: rtd1295 +Installed-Time: 1548323667 + +Package: kmod-lib-zlib +Version: 4.1.7-1 +Depends: kernel (= 4.1.7-1-e6b7dd72522ec3c2353db6b443ccc6d2) +Status: install hold installed +Architecture: rtd1295 +Installed-Time: 1548323667 + +Package: kmod-fs-nfs-common +Version: 4.1.7-1 +Depends: kernel (= 4.1.7-1-e6b7dd72522ec3c2353db6b443ccc6d2) +Status: install hold installed +Architecture: rtd1295 +Installed-Time: 1548323667 + +Package: kmod-mppe +Version: 4.1.7-1 +Depends: kernel (= 4.1.7-1-e6b7dd72522ec3c2353db6b443ccc6d2), kmod-ppp, kmod-crypto-core, kmod-crypto-arc4, kmod-crypto-sha1, kmod-crypto-ecb +Status: install hold installed +Architecture: rtd1295 +Installed-Time: 1548323667 + +Package: kmod-crypto-arc4 +Version: 4.1.7-1 +Depends: kernel (= 4.1.7-1-e6b7dd72522ec3c2353db6b443ccc6d2), kmod-crypto-core +Status: install hold installed +Architecture: rtd1295 +Installed-Time: 1548323666 + +Package: kmod-crypto-sha1 +Version: 4.1.7-1 +Depends: kernel (= 4.1.7-1-e6b7dd72522ec3c2353db6b443ccc6d2), kmod-crypto-hash, kmod-crypto-core +Status: install hold installed +Architecture: rtd1295 +Installed-Time: 1548323666 + +Package: kmod-pppol2tp +Version: 4.1.7-1 +Depends: kernel (= 4.1.7-1-e6b7dd72522ec3c2353db6b443ccc6d2), kmod-ppp, kmod-pppox, kmod-l2tp +Status: install hold installed +Architecture: rtd1295 +Installed-Time: 1548323667 + +Package: kmod-scsi-core +Version: 4.1.7-1 +Depends: kernel (= 4.1.7-1-e6b7dd72522ec3c2353db6b443ccc6d2) +Status: install hold installed +Architecture: rtd1295 +Installed-Time: 1548323666 +Auto-Installed: yes + +Package: kmod-slhc +Version: 4.1.7-1 +Depends: kernel (= 4.1.7-1-e6b7dd72522ec3c2353db6b443ccc6d2), kmod-lib-crc-ccitt +Status: install hold installed +Architecture: rtd1295 +Installed-Time: 1548323667 +Auto-Installed: yes + diff --git a/root/usr/bin/lua b/root/usr/bin/lua index d83f1bd..384a7e6 100755 Binary files a/root/usr/bin/lua and b/root/usr/bin/lua differ diff --git a/root/usr/bin/luac b/root/usr/bin/luac index 1ed4d88..0cc899f 100755 Binary files a/root/usr/bin/luac and b/root/usr/bin/luac differ diff --git a/root/usr/lib/liblua.so.5.1.5 b/root/usr/lib/liblua.so.5.1.5 index 9a40bd0..f406cc9 100644 Binary files a/root/usr/lib/liblua.so.5.1.5 and b/root/usr/lib/liblua.so.5.1.5 differ diff --git a/root/usr/lib/lua/luci/controller/diskmanager.lua b/root/usr/lib/lua/luci/controller/diskmanager.lua index ad8c0ca..6d14425 100644 --- a/root/usr/lib/lua/luci/controller/diskmanager.lua +++ b/root/usr/lib/lua/luci/controller/diskmanager.lua @@ -36,7 +36,7 @@ function index() if executables_all_existed then -- entry(path, target, title, order) -- set leaf attr to true to pass argument throughe url (e.g. admin/system/disk/partition/sda) - entry({"admin", "system", "disk"}, cbi("disk"), _("Disk Management"), 55) + entry({"admin", "system", "disk"}, form("disk"), _("Disk Management"), 55) entry({"admin", "system", "disk", "partition"}, template("partition"), nil).leaf = true entry({"admin", "system", "disk", "addpartition"}, call("action_addpartition"), nil).leaf = true entry({"admin", "system", "disk", "removepartition"}, call("action_removepartition"), nil).leaf = true diff --git a/root/usr/lib/lua/luci/model/cbi/aria2.lua b/root/usr/lib/lua/luci/model/cbi/aria2.lua index 9e9df9a..d36610b 100644 --- a/root/usr/lib/lua/luci/model/cbi/aria2.lua +++ b/root/usr/lib/lua/luci/model/cbi/aria2.lua @@ -135,7 +135,7 @@ o = s:taboption("task", Value, "max_concurrent_downloads", translate("Max concur o.placeholder = "5" o = s:taboption("task", Value, "max_connection_per_server", translate("Max connection per server"), "1-16") -o.datetype = "range(1, 16)" +o.datatype = "range(1, 16)" o.placeholder = "1" o = s:taboption("task", Value, "min_split_size", translate("Min split size"), "1M-1024M") diff --git a/root/usr/lib/lua/luci/model/cbi/vsftpd.lua b/root/usr/lib/lua/luci/model/cbi/vsftpd.lua index 47c6289..f8bbf1c 100644 --- a/root/usr/lib/lua/luci/model/cbi/vsftpd.lua +++ b/root/usr/lib/lua/luci/model/cbi/vsftpd.lua @@ -163,6 +163,7 @@ anon_max_rate.rmempty=true anon_max_rate:depends("anonymous_enable",1) chown_username=s:taboption("anonymous",ListValue,"chown_username",translate("Chown User")) chown_username:depends("anonymous_enable",1) +local list_user for _, list_user in luci.util.vspairs(luci.util.split(luci.sys.exec("cat /etc/passwd | cut -f 1 -d:"))) do chown_username:value(list_user) end @@ -174,8 +175,14 @@ local_userlist_type=s:taboption("userlist",ListValue,"userlist_type",translate(" local_userlist_type:value("allow","allow") local_userlist_type:value("deny","deny") list=s:taboption("userlist",DynamicList,"userlist",translate("User")) +list.datatype = "string" for _, list_user in luci.util.vspairs(luci.util.split(luci.sys.exec("cat /etc/passwd | cut -f 1 -d:"))) do - list:value(list_user) + repeat + if list_user == "" then + break + end + list:value(list_user) + until true end tmpl=s:taboption("template",Value,"_tmpl","",translate("Here,you can edit the template of config file")) diff --git a/root/usr/lib/lua/luci/view/partition.htm b/root/usr/lib/lua/luci/view/partition.htm index e722086..b9bfc7c 100644 --- a/root/usr/lib/lua/luci/view/partition.htm +++ b/root/usr/lib/lua/luci/view/partition.htm @@ -251,11 +251,11 @@