[openwrt/openwrt] rpcd: remove file when applied
LEDE Commits
lede-commits at lists.infradead.org
Thu Nov 12 12:22:33 EST 2020
ynezz pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/86917e4979b020e33a63e10c2f3073586964a202
commit 86917e4979b020e33a63e10c2f3073586964a202
Author: Huangbin Zhan <zhanhb88 at gmail.com>
AuthorDate: Wed Nov 4 17:29:30 2020 +0800
rpcd: remove file when applied
Make sure exit value of this script is zero. Or the file won't be deleted.
Signed-off-by: Huangbin Zhan <zhanhb88 at gmail.com>
---
package/system/rpcd/Makefile | 2 +-
package/system/rpcd/files/50-migrate-rpcd-ubus-sock.sh | 10 ++++++----
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/package/system/rpcd/Makefile b/package/system/rpcd/Makefile
index 917ad6ff86..b8a974086f 100644
--- a/package/system/rpcd/Makefile
+++ b/package/system/rpcd/Makefile
@@ -8,7 +8,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=rpcd
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=$(PROJECT_GIT)/project/rpcd.git
diff --git a/package/system/rpcd/files/50-migrate-rpcd-ubus-sock.sh b/package/system/rpcd/files/50-migrate-rpcd-ubus-sock.sh
index 1365aed39a..609b0f9835 100755
--- a/package/system/rpcd/files/50-migrate-rpcd-ubus-sock.sh
+++ b/package/system/rpcd/files/50-migrate-rpcd-ubus-sock.sh
@@ -1,6 +1,8 @@
#!/bin/sh
-[ "$(uci get rpcd. at rpcd[0].socket)" = "/var/run/ubus.sock" ] && {
- uci set rpcd. at rpcd[0].socket='/var/run/ubus/ubus.sock'
- uci commit rpcd
-}
+[ "$(uci get rpcd. at rpcd[0].socket)" = "/var/run/ubus.sock" ] || exit 0
+
+uci set rpcd. at rpcd[0].socket='/var/run/ubus/ubus.sock'
+uci commit rpcd
+
+exit 0
More information about the lede-commits
mailing list