aboutsummaryrefslogtreecommitdiffstats
path: root/package/system/rpcd/files/50-migrate-rpcd-ubus-sock.sh
diff options
context:
space:
mode:
authorHuangbin Zhan <zhanhb88@gmail.com>2020-11-04 17:29:30 +0800
committerPetr Štetiar <ynezz@true.cz>2020-11-12 18:19:44 +0100
commit86917e4979b020e33a63e10c2f3073586964a202 (patch)
treee3934f8ce7217055176275b90ac14b1b28c9b35a /package/system/rpcd/files/50-migrate-rpcd-ubus-sock.sh
parent8d7a6d48ebd826a68c3149e77ac08cd38a91ecde (diff)
downloadupstream-86917e4979b020e33a63e10c2f3073586964a202.tar.gz
upstream-86917e4979b020e33a63e10c2f3073586964a202.tar.bz2
upstream-86917e4979b020e33a63e10c2f3073586964a202.zip
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@gmail.com>
Diffstat (limited to 'package/system/rpcd/files/50-migrate-rpcd-ubus-sock.sh')
-rwxr-xr-xpackage/system/rpcd/files/50-migrate-rpcd-ubus-sock.sh10
1 files changed, 6 insertions, 4 deletions
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.@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