🐶 Sync 2025-11-02 14:26:26
This commit is contained in:
22
luci-app-cifs-mount/Makefile
Normal file
22
luci-app-cifs-mount/Makefile
Normal file
@@ -0,0 +1,22 @@
|
||||
|
||||
# Copyright (C) 2016 Openwrt.org
|
||||
#
|
||||
# This is free software, licensed under the Apache License, Version 2.0 .
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
LUCI_TITLE:=LuCI for SMB/CIFS,WebDAV Mount
|
||||
LUCI_DEPENDS:=+mount-utils +kmod-fs-cifs +kmod-nls-utf8 +davfs2
|
||||
LUCI_PKGARCH:=all
|
||||
PKG_NAME:=luci-app-cifs-mount
|
||||
PKG_VERSION:=1.4.2-1
|
||||
PKG_RELEASE:=
|
||||
|
||||
define Package/$(PKG_NAME)/conffiles
|
||||
/etc/config/cifs
|
||||
endef
|
||||
|
||||
include $(TOPDIR)/feeds/luci/luci.mk
|
||||
|
||||
# call BuildPackage - OpenWrt buildroot signature
|
||||
10
luci-app-cifs-mount/luasrc/controller/cifs.lua
Normal file
10
luci-app-cifs-mount/luasrc/controller/cifs.lua
Normal file
@@ -0,0 +1,10 @@
|
||||
|
||||
module("luci.controller.cifs", package.seeall)
|
||||
|
||||
function index()
|
||||
if not nixio.fs.access("/etc/config/cifs") then
|
||||
return
|
||||
end
|
||||
|
||||
entry({"admin", "nas", "cifs"}, cbi("cifs"), _("Mount NetShare")).dependent = true
|
||||
end
|
||||
145
luci-app-cifs-mount/luasrc/model/cbi/cifs.lua
Normal file
145
luci-app-cifs-mount/luasrc/model/cbi/cifs.lua
Normal file
@@ -0,0 +1,145 @@
|
||||
local fs = require "nixio.fs"
|
||||
local m,s,o
|
||||
local util = require "luci.util"
|
||||
local rclone_version = util.trim(util.exec("/etc/init.d/cifs rclone_installed"))
|
||||
local rclone_installed = (string.len(rclone_version) > 0)
|
||||
|
||||
m = Map("cifs", translate("Mount NetShare"), translate("Mount NetShare for OpenWrt"))
|
||||
|
||||
s = m:section(TypedSection, "cifs")
|
||||
s.anonymous = true
|
||||
|
||||
s:tab("global", translate("Global Settings"))
|
||||
s:tab("davfs", translate("WebDAV"), translate("Advance WebDAV mounting settings"))
|
||||
|
||||
switch = s:taboption("global", Flag, "enabled", translate("Enable"))
|
||||
switch.rmempty = false
|
||||
|
||||
delay = s:taboption("global", Value, "delay", translate("Delay"), translate("Boot delay (in seconds), skip if 0 or empty"))
|
||||
delay.datatype = "uinteger"
|
||||
|
||||
o = s:taboption("davfs", Value, "cache_dir", translate("Cache Path"), translate("You don't want to use FAT/exFAT"))
|
||||
o.placeholder = "/tmp/cache/davfs"
|
||||
|
||||
o = s:taboption("davfs", ListValue, "rclone_cache_mode", translate("Rclone Cache Mode"), translate("Refer to '--vfs-cache-mode' in <a href=\"https://rclone.org/commands/rclone_mount/#vfs-file-caching\" target=\"_blank\">official documentation</a>. " ..
|
||||
"If you want to upload a file that exceeds the available memory, you need to at least select \"writes\" here and make sure the cache folder is large enough"))
|
||||
o:value("", "off")
|
||||
o:value("minimal")
|
||||
o:value("writes")
|
||||
o:value("full")
|
||||
|
||||
o = s:taboption("davfs", Value, "rclone_extras", translate("Rclone Custom"), translate("Extra parameters for \"rclone mount\""))
|
||||
|
||||
s = m:section(TypedSection, "natshare", translate("Mount CIFS/SMB"))
|
||||
s.anonymous = true
|
||||
s.addremove = true
|
||||
s.template = "cbi/tblsection"
|
||||
|
||||
o = s:option(Flag, "enabled", translate("Enable"))
|
||||
o.default = 1
|
||||
o.rmempty = false
|
||||
|
||||
server = s:option(Value, "server", translate("Server IP"))
|
||||
server.datatype = "host"
|
||||
server.placeholder = "192.168.50.1"
|
||||
server.size = 12
|
||||
server.rmempty = false
|
||||
|
||||
name = s:option(Value, "name", translate("Share Folder"))
|
||||
name.datatype = "minlength(1)"
|
||||
name.placeholder = "Share"
|
||||
name.rmempty = false
|
||||
name.size = 8
|
||||
|
||||
pth = s:option(Value, "natpath", translate("Mount Path"))
|
||||
if nixio.fs.access("/etc/config/fstab") then
|
||||
pth.titleref = luci.dispatcher.build_url("admin", "system", "fstab")
|
||||
end
|
||||
pth.datatype = "minlength(2)"
|
||||
pth.placeholder = "/mnt/samba"
|
||||
pth.rmempty = false
|
||||
pth.size = 10
|
||||
|
||||
smbver = s:option(Value, "smbver", translate("SMB Version"))
|
||||
smbver.rmempty = false
|
||||
smbver:value("1.0","SMB v1")
|
||||
smbver:value("2.0","SMB v2")
|
||||
smbver:value("3.0","SMB v3")
|
||||
smbver:value("nil","None")
|
||||
smbver.default = "2.0"
|
||||
smbver.size = 3
|
||||
|
||||
agm = s:option(Value, "agm", translate("Arguments"))
|
||||
agm:value("ro", translate("Read Only"))
|
||||
agm:value("rw", translate("Read/Write"))
|
||||
agm.rmempty = true
|
||||
agm.default = "ro"
|
||||
|
||||
iocharset = s:option(Value, "iocharset", translate("Charset"))
|
||||
iocharset:value("utf8", "UTF8")
|
||||
iocharset.default = "utf8"
|
||||
iocharset.size = 2
|
||||
|
||||
users = s:option(Value, "users", translate("User"))
|
||||
users:value("guest", "Guest")
|
||||
users.rmempty = true
|
||||
users.default = "guest"
|
||||
|
||||
pwd = s:option(Value, "pwd", translate("Password"))
|
||||
pwd.rmempty = true
|
||||
pwd.password = true
|
||||
pwd.size = 8
|
||||
|
||||
s = m:section(TypedSection, "davfs", translate("Mount WebDAV"), translate("Regarding the choice of engine: <br>" ..
|
||||
"<b>davfs2</b>: It is installed by default, but its random read and write performance is very poor. Reading and writing files at any location will cause the entire file to be downloaded. <br>" ..
|
||||
"<a href=\"https://rclone.org/\" target=\"_blank\"><b>Rclone</b></a>: Good reading and writing performance, but not installed by default. (No configuration required after installation)<br>" ..
|
||||
"<b>Auto</b>: Use Rclone if it is installed, otherwise fall back to davfs2. (Recommend) <br>") ..
|
||||
translatef("Rclone status: %s <br>", rclone_installed and translatef("%s installed", rclone_version) or translate("Not installed")))
|
||||
s.anonymous = true
|
||||
s.addremove = true
|
||||
s.template = "cbi/tblsection"
|
||||
|
||||
o = s:option(Flag, "enabled", translate("Enable"))
|
||||
o.default = 1
|
||||
o.rmempty = false
|
||||
|
||||
server = s:option(Value, "url", translate("URL"))
|
||||
server.datatype = "minlength(1)"
|
||||
server.placeholder = "http://"
|
||||
server.size = 16
|
||||
server.rmempty = false
|
||||
|
||||
pth = s:option(Value, "mountpoint", translate("Mount Path"))
|
||||
if nixio.fs.access("/etc/config/fstab") then
|
||||
pth.titleref = luci.dispatcher.build_url("admin", "system", "fstab")
|
||||
end
|
||||
pth.datatype = "minlength(2)"
|
||||
pth.placeholder = "/mnt/webdav"
|
||||
pth.rmempty = false
|
||||
pth.size = 10
|
||||
|
||||
o = s:option(ListValue, "engine", translate("Engine"))
|
||||
o:value("auto", translate("Auto"))
|
||||
o:value("davfs2")
|
||||
-- o:value("webdavfs")
|
||||
o:value("rclone", "Rclone")
|
||||
o.default = "auto"
|
||||
o.rmempty = false
|
||||
|
||||
agm = s:option(Value, "arguments", translate("Arguments"))
|
||||
agm:value("ro", translate("Read Only"))
|
||||
agm:value("rw", translate("Read/Write"))
|
||||
agm.rmempty = true
|
||||
agm.default = "ro"
|
||||
|
||||
users = s:option(Value, "username", translate("User"))
|
||||
users:value("none", "Guest")
|
||||
users.rmempty = true
|
||||
users.default = "none"
|
||||
|
||||
pwd = s:option(Value, "password", translate("Password"))
|
||||
pwd.rmempty = true
|
||||
pwd.password = true
|
||||
pwd.size = 8
|
||||
|
||||
return m
|
||||
98
luci-app-cifs-mount/po/zh-cn/cifs.po
Normal file
98
luci-app-cifs-mount/po/zh-cn/cifs.po
Normal file
@@ -0,0 +1,98 @@
|
||||
msgid "Mount NetShare"
|
||||
msgstr "挂载网络共享"
|
||||
|
||||
msgid "Mount NetShare for OpenWrt"
|
||||
msgstr "可以将 SMB/CIFS,WebDAV 的共享文件夹挂载到本地(修改挂载后,需要重启使用这些文件夹的客户端)"
|
||||
|
||||
msgid "Delay"
|
||||
msgstr "延迟"
|
||||
|
||||
msgid "Boot delay (in seconds), skip if 0 or empty"
|
||||
msgstr "开机延迟(秒),0或者空则跳过"
|
||||
|
||||
msgid "Advance WebDAV mounting settings"
|
||||
msgstr "高级 WebDAV 挂载设置"
|
||||
|
||||
msgid "Cache Path"
|
||||
msgstr "缓存路径"
|
||||
|
||||
msgid "You don't want to use FAT/exFAT"
|
||||
msgstr "你不会想要使用 FAT/exFAT"
|
||||
|
||||
msgid "Rclone Cache Mode"
|
||||
msgstr "Rclone 缓存模式"
|
||||
|
||||
msgid ""
|
||||
"Refer to '--vfs-cache-mode' in <a href=\"https://rclone.org/commands/rclone_mount/#vfs-file-caching\" target=\"_blank\">official documentation</a>. "
|
||||
"If you want to upload a file that exceeds the available memory, you need to at least select \"writes\" here and make sure the cache folder is large enough"
|
||||
msgstr ""
|
||||
"参考<a href=\"https://rclone.org/commands/rclone_mount/#vfs-file-caching\" target=\"_blank\">官方文档</a>中的‘--vfs-cache-mode’。"
|
||||
"如果你要上传大小超过可用内存的文件,那么这里至少需要选择“writes”,并且确保缓存文件夹空间足够大"
|
||||
|
||||
msgid "Rclone Custom"
|
||||
msgstr "Rclone 自定义"
|
||||
|
||||
msgid "Extra parameters for \"rclone mount\""
|
||||
msgstr "“rclone mount”的额外参数"
|
||||
|
||||
msgid "Mount CIFS/SMB"
|
||||
msgstr "挂载 CIFS/SMB (Windows 网络共享)"
|
||||
|
||||
msgid "Server IP"
|
||||
msgstr "服务器IP"
|
||||
|
||||
msgid "Share Folder"
|
||||
msgstr "共享文件夹"
|
||||
|
||||
msgid "Mount Path"
|
||||
msgstr "挂载路径"
|
||||
|
||||
msgid "SMB Version"
|
||||
msgstr "SMB 版本"
|
||||
|
||||
msgid "Arguments"
|
||||
msgstr "挂载参数"
|
||||
|
||||
msgid "Charset"
|
||||
msgstr "字符集"
|
||||
|
||||
msgid "User"
|
||||
msgstr "用户名"
|
||||
|
||||
msgid "Password"
|
||||
msgstr "密码"
|
||||
|
||||
msgid "Read Only"
|
||||
msgstr "只读"
|
||||
|
||||
msgid "Read/Write"
|
||||
msgstr "可读/写"
|
||||
|
||||
msgid "Mount WebDAV"
|
||||
msgstr "挂载 WebDAV"
|
||||
|
||||
msgid "Engine"
|
||||
msgstr "引擎"
|
||||
|
||||
msgid "Auto"
|
||||
msgstr "自动"
|
||||
|
||||
msgid "Rclone status: %s <br>"
|
||||
msgstr "Rclone状态:%s <br>"
|
||||
|
||||
msgid "%s installed"
|
||||
msgstr "已安装 %s"
|
||||
|
||||
msgid "Not installed"
|
||||
msgstr "未安装"
|
||||
|
||||
msgid ""
|
||||
"Regarding the choice of engine: <br>"
|
||||
"<b>davfs2</b>: It is installed by default, but its random read and write performance is very poor. Reading and writing files at any location will cause the entire file to be downloaded. <br>"
|
||||
"<a href=\"https://rclone.org/\" target=\"_blank\"><b>Rclone</b></a>: Good reading and writing performance, but not installed by default. (No configuration required after installation)<br>"
|
||||
"<b>Auto</b>: Use Rclone if it is installed, otherwise fall back to davfs2. (Recommend) <br>"
|
||||
msgstr ""
|
||||
"关于引擎的选择:<br>"
|
||||
"<b>davfs2</b>:默认已安装,但是其随机读写性能非常差,读写文件任意位置都会导致整个文件被下载。<br>"
|
||||
"<a href=\"https://rclone.org/\" target=\"_blank\"><b>Rclone</b></a>:读写性能好,但默认未安装。(安装后无需配置)<br>"
|
||||
"<b>自动</b>:如果安装了Rclone则使用Rclone,否则退回到davfs2。(推荐)<br>"
|
||||
1
luci-app-cifs-mount/po/zh_Hans
Symbolic link
1
luci-app-cifs-mount/po/zh_Hans
Symbolic link
@@ -0,0 +1 @@
|
||||
zh-cn
|
||||
6
luci-app-cifs-mount/root/etc/config/cifs
Normal file
6
luci-app-cifs-mount/root/etc/config/cifs
Normal file
@@ -0,0 +1,6 @@
|
||||
|
||||
config cifs
|
||||
option enabled '0'
|
||||
option workgroup 'WORKGROUP'
|
||||
option delay '5'
|
||||
|
||||
7
luci-app-cifs-mount/root/etc/davfs2/script.conf
Normal file
7
luci-app-cifs-mount/root/etc/davfs2/script.conf
Normal file
@@ -0,0 +1,7 @@
|
||||
#
|
||||
# davfs2 configuration file
|
||||
# please see http://linux.die.net/man/5/davfs2.conf for details
|
||||
#
|
||||
buf_size 512
|
||||
cache_dir /tmp/davfs2
|
||||
cache_size 50
|
||||
11
luci-app-cifs-mount/root/etc/hotplug.d/iface/97-cifs-mount
Normal file
11
luci-app-cifs-mount/root/etc/hotplug.d/iface/97-cifs-mount
Normal file
@@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
|
||||
[ "$ACTION" = ifup -o "$ACTION" = ifupdate ] || exit 0
|
||||
[ "$ACTION" = ifupdate -a -z "$IFUPDATE_ADDRESSES" -a -z "$IFUPDATE_DATA" ] && exit 0
|
||||
|
||||
/etc/init.d/cifs enabled || exit 0
|
||||
|
||||
logger -t cifs-mount "Reloading cifs-mount due to $ACTION of $INTERFACE ($DEVICE)"
|
||||
|
||||
# use "start" for keeping mounted configs
|
||||
/etc/init.d/cifs start
|
||||
173
luci-app-cifs-mount/root/etc/init.d/cifs
Executable file
173
luci-app-cifs-mount/root/etc/init.d/cifs
Executable file
@@ -0,0 +1,173 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=97
|
||||
|
||||
if type extra_command >/dev/null; then
|
||||
extra_command "rclone_installed" " Get Rclone installation"
|
||||
else
|
||||
EXTRA_COMMANDS="${EXTRA_COMMANDS} rclone_installed"
|
||||
fi
|
||||
|
||||
cifs_header() {
|
||||
local enabled
|
||||
local delay
|
||||
local cache_dir
|
||||
local rclone_cache_mode rclone_extras
|
||||
|
||||
config_get enabled $1 enabled
|
||||
config_get delay $1 delay 0
|
||||
config_get cache_dir $1 cache_dir "/tmp/cache/davfs"
|
||||
config_get rclone_cache_mode $1 rclone_cache_mode
|
||||
config_get rclone_extras $1 rclone_extras
|
||||
|
||||
ENABLED=$enabled
|
||||
DELAY=$delay
|
||||
CACHE_DIR="$cache_dir"
|
||||
if [ -n "$rclone_cache_mode" -a "$rclone_cache_mode" != "off" ]; then
|
||||
rclone_extras="--cache-dir \"$cache_dir/rclone\" --vfs-cache-mode $rclone_cache_mode $rclone_extras"
|
||||
fi
|
||||
RCLONE_EXTRAS="$rclone_extras"
|
||||
}
|
||||
|
||||
mount_natshare() {
|
||||
local server
|
||||
local name
|
||||
local natpath
|
||||
local guest
|
||||
local users
|
||||
local pwd
|
||||
local agm
|
||||
local iocharset
|
||||
local smbver
|
||||
local enabled
|
||||
|
||||
config_get enabled $1 enabled 1
|
||||
[ "$enabled" = 1 ] || return 0
|
||||
config_get server $1 server
|
||||
config_get name $1 name
|
||||
config_get natpath $1 natpath
|
||||
config_get guest $1 guest
|
||||
config_get users $1 users
|
||||
config_get pwd $1 pwd
|
||||
config_get agm $1 agm "ro"
|
||||
config_get iocharset $1 iocharset
|
||||
config_get smbver $1 smbver
|
||||
|
||||
if [ -z "$server" -o -z "$name" -o -z "$natpath" ]; then
|
||||
logger -t cifs "server/name or mountpoint is empty"
|
||||
return 1
|
||||
fi
|
||||
mountpoint -q "$natpath" && return 0
|
||||
mkdir -p "$natpath" && chmod 777 "$natpath"
|
||||
|
||||
if [ "$smbver" = "nil" ];then
|
||||
smbverarg=""
|
||||
else
|
||||
smbverarg="vers=$smbver,"
|
||||
fi
|
||||
#echo "mount -t cifs -o ${smbverarg}username=$users,password=$pwd,iocharset=$iocharset,$agm //$server/$name $natpath"
|
||||
/usr/bin/mount -t cifs -o "${smbverarg}username=$users,password=$pwd,iocharset=$iocharset,$agm" "//$server/$name" "$natpath"
|
||||
}
|
||||
|
||||
mount_davfs() {
|
||||
local url
|
||||
local username
|
||||
local password
|
||||
local mountpoint
|
||||
local arguments
|
||||
local engine
|
||||
local enabled
|
||||
local rclone_mount_args
|
||||
|
||||
config_get enabled $1 enabled 1
|
||||
[ "$enabled" = 1 ] || return 0
|
||||
config_get url $1 url
|
||||
config_get username $1 username
|
||||
config_get password $1 password
|
||||
config_get mountpoint $1 mountpoint
|
||||
config_get arguments $1 arguments
|
||||
config_get engine $1 engine 'auto'
|
||||
|
||||
if [ -z "$url" -o -z "$mountpoint" ]; then
|
||||
logger -t davfs "url or mountpoint is empty"
|
||||
return 1
|
||||
fi
|
||||
mountpoint -q "$mountpoint" && return 0
|
||||
mkdir -p "$mountpoint" && chmod 777 "$mountpoint"
|
||||
|
||||
if [ -n "$RCLONE_INSTALLED" -a "$engine" = "auto" ]; then
|
||||
engine=rclone
|
||||
fi
|
||||
|
||||
if [ "$engine" = "rclone" ]; then
|
||||
touch /var/etc/cifs-mount/rclone_$1.conf
|
||||
chmod 600 /var/etc/cifs-mount/rclone_$1.conf
|
||||
rclone --config /var/etc/cifs-mount/rclone_$1.conf config create --non-interactive \
|
||||
cifs_rclone_$1 webdav "user=$username" "pass=$password" "url=$url" || return 1
|
||||
rclone_mount_args="--allow-other --default-permissions"
|
||||
echo "$arguments" | grep -Fwq ro && rclone_mount_args="$rclone_mount_args --read-only"
|
||||
eval "rclone --config /var/etc/cifs-mount/rclone_$1.conf mount --daemon $RCLONE_EXTRAS $rclone_mount_args \
|
||||
--devname \"$url\" cifs_rclone_$1: \"$mountpoint\""
|
||||
return $?
|
||||
fi
|
||||
|
||||
[ -n "$arguments" ] && arguments=",$arguments"
|
||||
|
||||
if [ "$engine" = "webdavfs" ]; then
|
||||
arguments="allow_other$arguments"
|
||||
[ -n "$password" ] && arguments="password=$password,$arguments"
|
||||
[ -n "$username" ] && arguments="username=$username,$arguments"
|
||||
/usr/bin/mount -t webdavfs -o "$arguments" "$url" "$mountpoint"
|
||||
return $?
|
||||
fi
|
||||
{ grep -v '^cache_dir ' /etc/davfs2/script.conf ; echo; echo "cache_dir $CACHE_DIR/davfs2"; } >/var/etc/cifs-mount/davfs2.conf
|
||||
# echo "/usr/bin/mount -t davfs -o \"conf=/var/etc/cifs-mount/davfs2.conf$arguments\" \"$url\" \"$mountpoint\""
|
||||
{ echo "$username"; echo "$password"; } | /usr/bin/mount -t davfs -o "conf=/var/etc/cifs-mount/davfs2.conf$arguments" "$url" "$mountpoint"
|
||||
}
|
||||
|
||||
boot() {
|
||||
BOOT=1
|
||||
start
|
||||
}
|
||||
|
||||
start() {
|
||||
ENABLED=0
|
||||
DELAY=0
|
||||
CACHE_DIR=/tmp/cache/davfs
|
||||
RCLONE_EXTRAS=
|
||||
|
||||
config_load cifs
|
||||
config_foreach cifs_header cifs
|
||||
|
||||
if [ "$ENABLED" == 1 ]; then
|
||||
if [ "$BOOT" == 1 -a "$DELAY" -gt 0 ]; then
|
||||
sleep "$DELAY"
|
||||
fi
|
||||
config_foreach mount_natshare natshare
|
||||
#echo "Cifs Mount succeed."
|
||||
if rclone_installed >/dev/null; then
|
||||
RCLONE_INSTALLED=1
|
||||
fi
|
||||
rm -rf /var/etc/cifs-mount
|
||||
mkdir -p /var/etc/cifs-mount
|
||||
mkdir -p "$CACHE_DIR/davfs2" "$CACHE_DIR/rclone"
|
||||
chmod 0777 "$CACHE_DIR/davfs2"
|
||||
chown nobody:nogroup "$CACHE_DIR/davfs2"
|
||||
chmod 0700 "$CACHE_DIR/rclone"
|
||||
config_foreach mount_davfs davfs
|
||||
fi
|
||||
}
|
||||
|
||||
stop() {
|
||||
/usr/bin/mount | grep '//' | awk -F ' ' '{print $3}' | while read line; do
|
||||
#echo "umount -d -l $line"
|
||||
/usr/bin/umount -d -l $line 2>/dev/null
|
||||
done
|
||||
rm -rf /var/etc/cifs-mount
|
||||
}
|
||||
|
||||
rclone_installed() {
|
||||
local version=$(rclone version 2>/dev/null |head -1 |cut -d' ' -f2)
|
||||
[ -z "$version" ] && return 1
|
||||
echo "$version"
|
||||
}
|
||||
7
luci-app-cifs-mount/root/etc/init.d/zcifs
Executable file
7
luci-app-cifs-mount/root/etc/init.d/zcifs
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=99
|
||||
|
||||
boot() {
|
||||
/etc/init.d/cifs start
|
||||
}
|
||||
11
luci-app-cifs-mount/root/etc/uci-defaults/luci-cifs
Executable file
11
luci-app-cifs-mount/root/etc/uci-defaults/luci-cifs
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
|
||||
uci -q batch <<-EOF >/dev/null
|
||||
delete ucitrack.@cifs[-1]
|
||||
add ucitrack cifs
|
||||
set ucitrack.@cifs[-1].init=cifs
|
||||
commit ucitrack
|
||||
EOF
|
||||
|
||||
rm -f /tmp/luci-indexcache
|
||||
exit 0
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"luci-app-cifs-mount": {
|
||||
"description": "Grant UCI access for luci-app-cifs-mount",
|
||||
"read": {
|
||||
"uci": [ "cifs" ]
|
||||
},
|
||||
"write": {
|
||||
"uci": [ "cifs" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user