Commit Graph

25 Commits

Author SHA1 Message Date
Paul Spooren
cbf69fb2ad cron: add procd listeners for crontabs
Add procd file listeners to check files in `/etc/crontabs/`.

Also unified a bit the function style.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2018-06-18 18:21:20 +02:00
Piotr Dymacz
6e44f47a90 sysntpd: restore support for peer-less (standalone) mode
ntpd from Busybox supports peer-less (standalone) mode when it's started
with option -l and without any peer provided with option -p. In this
mode ntpd uses local time as reference and acts as stratum 1 server.

This mode can be used in isolated networks, where Internet access and/or
other NTP server/s are not available, but the device has some other way
of getting correct time, like e.g. GPS (ugps supports setting local time
by default).

Support for this mode was incorrectly disabled/removed in:
1527f96ca6

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
Acked-by: Jo-Philipp Wich <jo@mein.io>
2017-03-15 23:05:00 +01:00
Jan-Tarek Butt
02d5f9477b busybox: prevent globbing, word splitting
Double quote to prevent globbing and word splitting.

Signed-off-by: Jan-Tarek Butt <tarek@ring0.de>
2016-10-15 11:36:51 +02:00
Felix Fietkau
88304ea6e5 sysntpd: remove procd_open_trigger/procd_close_trigger calls
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-07-29 16:41:08 +02:00
Hans Dedecker
96db69bd45 busybox: Call ntpd hotplug script for every action
Daemons that are waiting for a timesync are only triggered when the action is stratum.
As step is the first sync action pass all actions to the ntpd hotplug scripts; it's up
to the ntpd hotplugscript to filter out the actions it is interested in.

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2016-06-10 18:05:08 +02:00
Maxim Storchak
442ff3b34d busybox: run sysntpd at higher priority
When a router is under load ntpd would have better chance to accurately
maintain system time.

Signed-off-by: Maxim Storchak <m.storchak@gmail.com>
2016-05-30 22:53:35 +02:00
Hans Dedecker
6707d9750a busybox: sysntpd - Support for NTP servers received via DHCP(v6)
The busybox ntpd utility currently uses ntp servers specified in uci.
This patch allows the ntpd utility to use NTP servers received via DHCP(v6)
Following uci parameters have been added:
    use_dhcp : enables NTP server config via DHCP(v6)
    dhcp_interface : use NTP servers received only on the specified DHCP(v6) interfaces; if empty all interfaces are considered

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2016-05-24 13:30:58 +02:00
Steven Barth
d196b1fc2e Disable telnet in favor of passwordless SSH
This enables passworldless login for root via SSH whenever no root
password is set (e.g. after reset, flashing without keeping config
or in failsafe) and removes telnet support alltogether.

Signed-off-by: Steven Barth <steven@midlink.org>

SVN-Revision: 46809
2015-09-07 19:29:25 +00:00
Steven Barth
016d6acde5 ntp: add hotplug class for ntp-events
Based on a patch by Luiz Angelo Daros de Luca

Signed-off-by: Steven Barth <steven@midlink.org>

SVN-Revision: 43421
2014-11-28 11:41:25 +00:00
Steven Barth
3cdeac4173 busybox: remove validation message from bootup
A message:
uinteger - 9 = true
is displayed during boot. This is the result of the validate_data
command checking the cron log level. As the output is not
interesting, only the result, filter...

Signed-off-by: Michel Stam <m.stam@fugro.nl>

SVN-Revision: 42751
2014-10-02 19:47:33 +00:00
John Crispin
2ae05c57f8 package/*: remove useless explicit set of function returncode
somebody started to set a function returncode in the validation
stuff and everybody copies it, e.g.

myfunction()
{
	fire_command

	return $?
}

a function automatically returns with the last returncode,
so we can safely remove the command 'return $?'. reference:

http://tldp.org/LDP/abs/html/exit-status.html
"The last command executed in the function or script determines the exit status."

Signed-off-by: Bastian Bittorf <bittorf@bluebottle.com>

SVN-Revision: 42278
2014-08-25 06:35:50 +00:00
Luka Perkov
9dd205b2ad busybox: fix validation in sysntpd init script
Signed-off-by: Luka Perkov <luka@openwrt.org>

SVN-Revision: 41415
2014-06-30 10:11:18 +00:00
John Crispin
a51588a5f9 busybox: use ntp enabled config option
Even if enabled option is missing from ntp configuration we are still keeping
default behavior.

Signed-off-by: Luka Perkov <luka@openwrt.org>

SVN-Revision: 41355
2014-06-27 07:55:03 +00:00
Felix Fietkau
f960a1fdb0 busybox: fix processing of multiple NTP servers in the config (#15294)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 39935
2014-03-17 14:52:18 +00:00
Jo-Philipp Wich
1527f96ca6 busybox: do not abort sysntpd init if enable_server is unset, that variable just controls the server part for relaying NTP
SVN-Revision: 38936
2013-11-28 11:28:40 +00:00
John Crispin
93e9a71538 base-files: allow users to delect debug level during boot
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 38909
2013-11-25 08:34:55 +00:00
John Crispin
a9cfb4b827 procd: fixup 2 wrong option types
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 38789
2013-11-13 11:07:24 +00:00
John Crispin
1f93857092 procd: convert services to the new validation api
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 38787
2013-11-13 10:49:41 +00:00
Luka Perkov
ef5f836207 fix various init scripts
Changes include:

* removing unused variables
* replacing spaces with tabs where appropriate
* more consistency with variable declarations

Signed-off-by: Luka Perkov <luka@openwrt.org>

SVN-Revision: 38142
2013-09-23 21:58:36 +00:00
John Crispin
f874094402 procd: convert various packages to procd style init.d scripts
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 38023
2013-09-17 21:45:30 +00:00
Jo-Philipp Wich
c5b4d98d39 busybox: rename ntp init script back to sysntpd (#13920)
Renaming the init script to ntp broke LuCI time sync functionality and collides with other ntp packages

SVN-Revision: 37681
2013-08-04 12:40:24 +00:00
Luka Perkov
67f1d364b8 base-files/busybox: move ntpd init script from base-files to busybox
SVN-Revision: 37383
2013-07-17 22:24:45 +00:00
John Crispin
928b503435 busybox: convert crond init script to procd
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 37243
2013-07-11 17:00:30 +00:00
John Crispin
e3a6115686 busybox: convert telnet init script to procd
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 37242
2013-07-11 17:00:26 +00:00
John Crispin
4ebf19b48f packages: clean up the package folder
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 37007
2013-06-21 16:54:37 +00:00