Commit Graph

26 Commits (4a6795409d1520fd3da3e909a8bcf9d7fd0927bb)

Author SHA1 Message Date
Petr Štetiar 296e1f253c netifd,lldpd,rpcd,log: use generic service_running
commit eb204d14f75c ("base-files: implement generic service_running")
introduced generic service_running so it's not needed to copy&paste same
3 lines over and over again.

I've removed service_running from netifd/network init script as well,
because it was not working properly, looked quite strange and I didn't
understand the intention:

 $ /etc/init.d/network stop
 $ service network running && echo "yes" || echo "nope"
     ( have to wait for 30s )
 Command failed: Request timed out
 yes

Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years ago
Rafał Miłecki 1b937cb141 ubox: implement service_running() in log init.d script
It allows checking if service is running.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
5 years ago
Jeffery To d13e86d4c2 procd: Add wrapper for uci_validate_section()
This adds a wrapper (uci_load_validate) for uci_validate_section() that
allows callers (through a callback function) to access the values set by
uci_validate_section(), without having to manually declare a
(potentially long) list of local variables.

The callback function receives two arguments when called, the config
section name and the return value of uci_validate_section().

If no callback function is given, then the wrapper exits with the value
returned by uci_validate_section().

This also updates several init scripts to use the new wrapper function.

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
5 years ago
Karl Palsson 987e10af07 logd: create log directory for log_file
If log_file is specified, make sure its directory exists.

Signed-off-by: Karl Palsson <karlp@etactica.com>
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com> [PKG_RELEASE increase]
6 years ago
John Crispin 88a41074e8 ubox: update to latest git HEAD
128bc35 logread: fix reconnect logd logic
66347ec logread: move the code setting up the request blob out of the main loop
975a258 logread: move output connection setup code out of main loop
b81bea7 logread: cleanup pid file handling
d73e7d2 ubox: Replace strerror(errno) with %m format.

Signed-off-by: John Crispin <john@phrozen.org>
6 years ago
Hannu Nyman efa740b08b ubox: increase default size of system log buffer to 64 kB
Increase the default system log buffer size
from 16 kB (default both in logd source and in the startup script)
to 64 kB by adjusting the default value in startup script.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
8 years ago
John Crispin a4571b7631 ubox: make logging code honour the hostname properly
Signed-off-by: John Crispin <john@phrozen.org>
8 years ago
John Crispin eb099c5d6b ubox: add log_trailer_null option to uci
this allow us to use syslog tcp with \0 trailer
instead of \n trailer (logread -0 option)

Signed-off-by: Etienne CHAMPETIER <champetier.etienne@gmail.com>

SVN-Revision: 45329
9 years ago
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
10 years ago
John Crispin f63bb0adbd ubox: fix remote logging
in r41439 a flag for enabling remote logging was added,
but the actual check was done on a different variable.

Signed-off-by: Reiner Herrmann <reiner@reiner-h.de>

SVN-Revision: 41467
10 years ago
John Crispin ea535a9565 ubox: add a flag that allows us to disable remote log while keeping the ip settings inside uci
this makes webui foo a lot easier

Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 41439
10 years ago
John Crispin ca4078c110 ubox: update to latest git head
logread now shows the right time.

Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 39951
10 years ago
John Crispin bc6223666e ubox: update to latest git head
use the fd handover api of ubus to transfer log data
the uci option log_buffer_size can be used to override the default size of 16k

Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 39898
10 years ago
John Crispin 0dc9d8d6ff fstools: add the new fstools package
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 39895
10 years ago
John Crispin f9f8948c6e ubox: logd did not register its config.reload trigger properly
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 39616
10 years ago
John Crispin eceea6d6e1 ubox: revert log buffer size changes
the fix horribly broke existing setups

Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 39366
10 years ago
John Crispin 1de0eac947 ubox: update to latest git head
adds option to set internal buffer size

Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 39333
10 years ago
John Crispin e231f82cc0 ubox: fix up pidcount handling inside log.init
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 39022
11 years ago
Jo-Philipp Wich cdbff3641b Revert "ubox: the validation code has problems with the "(" char. use string for now"
This reverts commit f7c2ac3ea9b5f2dc4ef4ce4ef195de8a4ac5546b.

SVN-Revision: 38937
11 years ago
John Crispin fc3c72aba6 ubox: the validation code has problems with the "(" char. use string for now
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 38916
11 years ago
John Crispin 637440c415 ubox: fix typo that caused log_file to not be validated properly
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 38906
11 years ago
John Crispin 1b3a423ad5 procd: add validation to the log init script
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 38879
11 years ago
John Crispin 5fbfffe7f4 procd: ubox: update to latest git head
move log service from procd to ubox
some debloating on procd
the preinit part of procd is now also a seperate binary

Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 38822
11 years ago
John Crispin f60cb8c3d9 ubox: add a uci-default script for fstab generation
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 37199
11 years ago
John Crispin b1318530e3 ubox: update to latest git revision
* add pivot root support
* add back a /etc/init.d/fstab
* add "block mount/umount" support
* add anonymous swap/mount support
* add auto swap/mount support
* fix superflous error when inserting modules
* add back jffs2reset/jffs2mark

Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 37057
11 years ago
John Crispin 4ebf19b48f packages: clean up the package folder
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 37007
11 years ago