rpcd: remove file when applied
authorHuangbin Zhan <zhanhb88@gmail.com>
Wed, 4 Nov 2020 09:29:30 +0000 (17:29 +0800)
committerPetr Štetiar <ynezz@true.cz>
Thu, 12 Nov 2020 17:19:44 +0000 (18:19 +0100)
Make sure exit value of this script is zero. Or the file won't be deleted.

Signed-off-by: Huangbin Zhan <zhanhb88@gmail.com>
package/system/rpcd/Makefile
package/system/rpcd/files/50-migrate-rpcd-ubus-sock.sh

index 917ad6ff86604fd08a1dd881f2f25a8c66924642..b8a974086ff2493b26dd9f3f6fc73fbae44fb83f 100644 (file)
@@ -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
index 1365aed39a93a17e2273f3b69da588f15ca7dd6b..609b0f98353de541860c6f5589b66d134583b28e 100755 (executable)
@@ -1,6 +1,8 @@
 #!/bin/sh
 
-[ "$(uci get rpcd.@rpcd[0].socket)" = "/var/run/ubus.sock" ] && {
-       uci set rpcd.@rpcd[0].socket='/var/run/ubus/ubus.sock'
-       uci commit rpcd
-}
+[ "$(uci get rpcd.@rpcd[0].socket)" = "/var/run/ubus.sock" ] || exit 0
+
+uci set rpcd.@rpcd[0].socket='/var/run/ubus/ubus.sock'
+uci commit rpcd
+
+exit 0