[openwrt/openwrt] procd: simplify uxc init script

LEDE Commits lede-commits at lists.infradead.org
Sun Feb 13 15:31:45 PST 2022


dangole pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/5205010a546fed2227c208f6bd025b47398f4cf3

commit 5205010a546fed2227c208f6bd025b47398f4cf3
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Sun Feb 13 23:26:45 2022 +0000

    procd: simplify uxc init script
    
    'uxc boot' is inteded to be called multiple times, so there is not need
    to guard the first call on boot -- the actual code anyway didn't do
    that, so just remove it.
    
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 package/system/procd/files/uxc.init | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/package/system/procd/files/uxc.init b/package/system/procd/files/uxc.init
index 1e75b796f8..0b51925a71 100644
--- a/package/system/procd/files/uxc.init
+++ b/package/system/procd/files/uxc.init
@@ -6,17 +6,11 @@ NAME=uxc
 PROG=/sbin/uxc
 
 start_service() {
-	[ "${__BOOT_UXC}" = "1" ] || return 0
 	procd_open_instance "uxc"
 	procd_set_param command "$PROG" boot
 	procd_close_instance
 }
 
-boot() {
-	__BOOT_UXC=1
-	start
-}
-
 service_triggers() {
-	procd_add_raw_trigger "mount.add" 3000 /etc/init.d/uxc boot
+	procd_add_raw_trigger "mount.add" 3000 /etc/init.d/uxc start
 }



More information about the lede-commits mailing list