[openwrt/openwrt] uhttpd: adapt defaults for changes ubus.sock path
LEDE Commits
lede-commits at lists.infradead.org
Thu Oct 22 10:16:41 EDT 2020
dangole pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/061904d7e339db9cbc966506e1d72b9433bdf353
commit 061904d7e339db9cbc966506e1d72b9433bdf353
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Thu Oct 22 15:02:42 2020 +0100
uhttpd: adapt defaults for changes ubus.sock path
Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
package/network/services/uhttpd/Makefile | 2 +-
package/network/services/uhttpd/files/ubus.default | 5 +++++
package/network/services/uhttpd/files/uhttpd.config | 2 +-
3 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/package/network/services/uhttpd/Makefile b/package/network/services/uhttpd/Makefile
index dbade36b0a..83073122e6 100644
--- a/package/network/services/uhttpd/Makefile
+++ b/package/network/services/uhttpd/Makefile
@@ -8,7 +8,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=uhttpd
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=$(PROJECT_GIT)/project/uhttpd.git
diff --git a/package/network/services/uhttpd/files/ubus.default b/package/network/services/uhttpd/files/ubus.default
index f0f71e9d35..ca9e72a315 100644
--- a/package/network/services/uhttpd/files/ubus.default
+++ b/package/network/services/uhttpd/files/ubus.default
@@ -5,4 +5,9 @@ if [ -z "$(uci -q get uhttpd.main.ubus_prefix)" ]; then
uci commit uhttpd
fi
+[ "$(uci -q get uhttpd.main.ubus_socket)" = "/var/run/ubus.sock" ] && {
+ uci set uhttpd.main.ubus_socket='/var/run/ubus/ubus.sock'
+ uci commit uhttpd
+}
+
exit 0
diff --git a/package/network/services/uhttpd/files/uhttpd.config b/package/network/services/uhttpd/files/uhttpd.config
index 39089ca25b..f368d08e8b 100644
--- a/package/network/services/uhttpd/files/uhttpd.config
+++ b/package/network/services/uhttpd/files/uhttpd.config
@@ -59,7 +59,7 @@ config uhttpd main
# Specify the ubus-rpc prefix and socket path.
# option ubus_prefix /ubus
-# option ubus_socket /var/run/ubus.sock
+# option ubus_socket /var/run/ubus/ubus.sock
# CGI/Lua timeout, if the called script does not
# write data within the given amount of seconds,
More information about the lede-commits
mailing list