patches: luci: add /sbin/ntpd to see LuCI ntpd section

parent 14839d7d
From 5fe39b88edc052de30d1fcfaf09d9bf89b8a878f Mon Sep 17 00:00:00 2001
From: Josef Schlehofer <josef.schlehofer@nic.cz>
Date: Sun, 23 Jun 2019 23:20:15 +0200
Subject: [PATCH] luci-mod-system: add path for busybox ntpd
If there is no /usr/sbin/ntpd, the ntpd section in LuCI isn't shown.
This happens when we have located busybox ntpd in /sbin/ntpd instead of
/usr/sbin/ntpd.
Related to: https://gitlab.labs.nic.cz/turris/turris-build/blob/master/patches/openwrt/hack/0003-busybox-Try-to-install-everything-into-s-bin.patch
Fixes: https://forum.turris.cz/t/ntp-server-choice-removed/10405/14?u=pepe
Signed-off-by: Josef Schlehofer <josef.schlehofer@nic.cz>
---
.../luci-mod-system/luasrc/model/cbi/admin_system/system.lua | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules/luci-mod-system/luasrc/model/cbi/admin_system/system.lua b/modules/luci-mod-system/luasrc/model/cbi/admin_system/system.lua
index 33ec027e0..0c007df34 100644
--- a/modules/luci-mod-system/luasrc/model/cbi/admin_system/system.lua
+++ b/modules/luci-mod-system/luasrc/model/cbi/admin_system/system.lua
@@ -8,7 +8,7 @@ local fs = require "nixio.fs"
local conf = require "luci.config"
local m, s, o
-local has_ntpd = fs.access("/usr/sbin/ntpd")
+local has_ntpd = fs.access("/usr/sbin/ntpd") or fs.access("/sbin/ntpd")
local has_zram = fs.access("/etc/init.d/zram")
m = Map("system", translate("System"), translate("Here you can configure the basic aspects of your device like its hostname or the timezone."))
--
2.20.1
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment