luci-base: replace ufpd access check with service run check
authorFlorian Eckert <redacted>
Thu, 12 Feb 2026 11:45:24 +0000 (12:45 +0100)
committerFlorian Eckert <redacted>
Mon, 18 May 2026 07:48:13 +0000 (09:48 +0200)
It is not enough simply to check whether the tool is installed. It is
essential to check whether the service is actually running. After all,
we need the functionality provided by the service.

Signed-off-by: Florian Eckert <redacted>
modules/luci-base/root/usr/share/rpcd/ucode/luci

index b54011a84f4f2f7b0eeb89dcb06034574cb49099..57a96da14100cf3c4a01c314184506287181ce4c 100644 (file)
@@ -239,7 +239,6 @@ const methods = {
                                relayd:     access('/usr/sbin/relayd') == true,
                                apk:        access('/usr/bin/apk') == true,
                                wifi:       access('/sbin/wifi') == true,
-                               ufpd:       access('/usr/sbin/ufpd') == true,
                                vrf:        access('/sys/module/vrf/refcnt') == true, // vrf.ko is loaded
                                netifd_vrf: false,
                                mptcp:      access('/proc/sys/net/mptcp/enabled'),
@@ -332,6 +331,11 @@ const methods = {
                                fd.close();
                        }
 
+                       result.ufpd = false;
+                       if (access('/usr/sbin/ufpd')) {
+                               result.ufpd = system(`/etc/init.d/ufp running >/dev/null 2>/dev/null`) == 0
+                       }
+
                        return result;
                }
        },
git clone https://git.99rst.org/PROJECT