summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2014-05-25service: use avl_remove_all_elements()Felix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-05-25service: remove unused argument to service_update()Felix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-05-25service: fix double-free in error pathFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-05-25service: use blob_memdup()Felix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-05-25hotplug: fix memleak in debug codepathFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-05-24inittab: strip trailing whitespace (especially newline)Felix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-03-20inittab: avoid character collating to work around character class escaping ↵Felix Fietkau
issue in a regex This makes the regex work with musl Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-03-18rcS: fix a format string bugFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-03-18rcS: do not access ustream_buf data directlyFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-02-24instance: improve portability of setting resource limitsFelix Fietkau
the data type varies for different implementations Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-02-07commit e0921ed71bab0ad7d2344774a33c22809eb10190 set the timeout globallyJohn Crispin
lets restrict it to stop scripts only Signed-off-by: John Crispin <blogic@openwrt.org>
2014-01-29fix the dump logic to show validators and triggers even if no instances existJohn Crispin
Signed-off-by: John Crispin <blogic@openwrt.org>
2014-01-29force all runqueue tasks to a timeout of 15sJohn Crispin
Signed-off-by: John Crispin <blogic@openwrt.org>
2014-01-20state.c: pass ubus commandline is writable buffer to service_start_early()Jo-Philipp Wich
The service_start_early() function uses strtok() on the command line argument, therfore we cannot pass it constant string literals directly. Fixes OpenWrt bug #14832 Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2013-12-18procd: fix service file trackingJo-Philipp Wich
The instance_config_move() function in the procd instance managing code is missing a blobmsg_list_move() call to update the tracked file items with the newly calculated checksums in case of a file change. Without that change, services are always reloaded after the first change to a tracked file regardless of whether there are any subsequent changes or not. Add a missing instance of blobmsg_list_free() as well. Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2013-12-09fix copy paste errorJohn Crispin
Signed-off-by: John Crispin <blogic@openwrt.org>
2013-12-09procd: set resource limits for service instancesUlrich Weber
useful to enable core dumps or set resource limits Signed-off-by: Ulrich Weber <uw@xyne.com>
2013-11-22cleanup debug level handoverJohn Crispin
Signed-off-by: John Crispin <blogic@openwrt.org>
2013-11-20fix rcS memory leaks and running hookJohn Crispin
Signed-off-by: John Crispin <blogic@openwrt.org>
2013-11-19make ue of the md5.c inside libuboxJohn Crispin
Signed-off-by: John Crispin <blogic@openwrt.org>
2013-11-19fix up the order of respawn parameters for ubusJohn Crispin
Signed-off-by: John Crispin <blogic@openwrt.org>
2013-11-18add a event broadcast functionJohn Crispin
Signed-off-by: John Crispin <blogic@openwrt.org>
2013-11-18add debug level handover between preinit and main processJohn Crispin
Signed-off-by: John Crispin <blogic@openwrt.org>
2013-11-18make the service running trigger be queued directly after the service was ↵John Crispin
startetd Signed-off-by: John Crispin <blogic@openwrt.org>
2013-11-18add a function to add calls to the front of the rcS queueJohn Crispin
Signed-off-by: John Crispin <blogic@openwrt.org>
2013-11-15procd: Allow process respawning foreverHelmut Schaa
Use respawn_retry==0 as indication to respawn a process forever. Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com> Signed-off-by: John Crispin <blogic@openwrt.org>
2013-11-15debloat and reorganize codeJohn Crispin
split app into procd and init binaries remove log support, this is an external service now Signed-off-by: John Crispin <blogic@openwrt.org>
2013-11-12add service_validator supportJohn Crispin
Signed-off-by: John Crispin <blogic@openwrt.org>
2013-11-12add data type validatorJohn Crispin
Signed-off-by: John Crispin <blogic@openwrt.org>
2013-11-09bind the console to /dev/null if the real console fails to come upJohn Crispin
this was reported on irc by oc80z Signed-off-by: John Crispin <blogic@openwrt.org>
2013-11-08the automatic service restart should not happen during sysupgradeJohn Crispin
Signed-off-by: John Crispin <blogic@openwrt.org>
2013-10-24add hostname option to logreadJohn Crispin
Signed-off-by: John Crispin <blogic@openwrt.org>
2013-10-09add a prefix option for messages streamed using logreadJohn Crispin
Signed-off-by: Robin Kuck <robin@basicinside.de>
2013-10-01syslog: fix incorrect use of sizeof() in vsnprintf()Jo-Philipp Wich
2013-09-28syslog() is a blocking call on eglibc. as procd provides the actual syslog, ↵John Crispin
weneed to make sure that we do not run into a deadlock. Signed-off-by: John Crispin <blogic@openwrt.org> Signed-off-by: Markus Stenberg <markus.stenberg@iki.fi>
2013-09-17procd: Exit askfirst on read errorHelmut Schaa
When running askfirst on an unused tty device askfirst starts busylooping forever. Fix this by returning an error if we read an EOF. Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
2013-09-13coldplug: remove duplicated includeGabor Juhos
The unistd.h header is inluded twice. Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
2013-09-13coldplug: only start hotplug timer after udevtrigger finishedGabor Juhos
Currently the last event timer for hotplug is started after the udevtrigger process is forked. Starting the timer means that the first hotplug event must come in before the timer expires. During this time the kernel must load the binary of the udevtrigger from the underlying rootfs which can be time consuming on slow systems. On such systems, the timer expires before the first hotplug event happens which results in broken behaviour. Due to the missing device nodes, not the ubus nor the procd code works correctly in that case. Change the code to only start the hotplug last event timer after the udevtrigger process finishes. This ensures that the delay caused by accessing the underlying filesystem does not affects the desired behaviour. Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
2013-09-13udevtrigger: nuke scan_{subdir,class,block} functionsGabor Juhos
These functions are simple wrappers around the 'scan_subdir' function. Remove the wrapper code and use the 'scan_subdir' function directly instead. Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
2013-09-13udevtrigger: simplify scan_class functionGabor Juhos
Remove the local directory scanning code and use the scan_subdir function instead. Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
2013-09-13udevtrigger: simplify scan_block functionGabor Juhos
Remove the local directory scanning code and use the scan_subdir function instead. Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
2013-09-13udevtrigger: simplify scan_subsystem functionGabor Juhos
Remove the local directory scanning code and use the scan_subdir function instead. Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
2013-09-13udevtrigger: extend scan_subdir functionGabor Juhos
Add more arguments to the function to make it usable recursively. Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
2013-09-13udevtrigger: remove superfluous strlcpyGabor Juhos
Use the "/sys/class/block" string directly for the stat call. This makes the code simpler and reduces stack usage. Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
2013-09-13udevtrigger: add back directory name check into scan_subdirGabor Juhos
It has been accidentally removed by: commit 824a4b3da2c0be19ccf54a48dcd4c10677b82c1a Author: Gabor Juhos <juhosg@openwrt.org> Date: Tue Sep 10 12:59:25 2013 +0200 udevtrigger: reduce indent level in scan_* functions Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
2013-09-13fix skewed parameter order in respawn codeJohn Crispin
Signed-off-by: John Crispin <blogic@openwrt.org>
2013-09-13execute the "running" hook once the daemon is startedJohn Crispin
Signed-off-by: John Crispin <blogic@openwrt.org>
2013-09-13add a way for procd to queue async init.d callsJohn Crispin
Signed-off-by: John Crispin <blogic@openwrt.org>
2013-09-13fix a bug in the trigger handling codeJohn Crispin
Signed-off-by: John Crispin <blogic@openwrt.org>
2013-09-13remove now unused variableJohn Crispin
Signed-off-by: John Crispin <blogic@openwrt.org>