Skip to content
Snippets Groups Projects
Verified Commit af803291 authored by Josef Schlehofer's avatar Josef Schlehofer
Browse files

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

parent a6a43318
No related branches found
No related tags found
No related merge requests found
From 8648d20dace9a09b5fc378edb79b4bba6170adf2 Mon Sep 17 00:00:00 2001
From: Josef Schlehofer <josef.schlehofer@nic.cz>
Date: Mon, 24 Jun 2019 07:25:08 +0200
Subject: [PATCH] luci-mod-admin-full: 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
Reviewed in PR: https://gitlab.labs.nic.cz/turris/turris-build/merge_requests/17
---
.../luasrc/model/cbi/admin_system/system.lua | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules/luci-mod-admin-full/luasrc/model/cbi/admin_system/system.lua b/modules/luci-mod-admin-full/luasrc/model/cbi/admin_system/system.lua
index c7fdfcddb..87ce25a1a 100644
--- a/modules/luci-mod-admin-full/luasrc/model/cbi/admin_system/system.lua
+++ b/modules/luci-mod-admin-full/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")
m = Map("system", translate("System"), translate("Here you can configure the basic aspects of your device like its hostname or the timezone."))
m:chain("luci")
--
2.20.1
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment