oweals/procd.git
9 years agofix /dev/shm permissions, this time for real
Daniel Gimpelevich [Wed, 17 Jun 2015 13:18:36 +0000 (06:18 -0700)]
fix /dev/shm permissions, this time for real

Previous patch did not account for umask, now adding that.

Signed-off-by: Daniel Gimpelevich <daniel@gimpelevich.san-francisco.ca.us>
9 years agofix /dev/shm permissions
Daniel Gimpelevich [Wed, 17 Jun 2015 09:51:37 +0000 (02:51 -0700)]
fix /dev/shm permissions

On my Ubuntu system, the permissions are 1777. They are incorrect in
procd, leading to this:
https://forum.openwrt.org/viewtopic.php?id=57073
This in intended for both CC and DD.

Signed-off-by: Daniel Gimpelevich <daniel@gimpelevich.san-francisco.ca.us>
9 years agohotplug: support for interval commands
Rafał Miłecki [Sat, 9 May 2015 20:02:03 +0000 (22:02 +0200)]
hotplug: support for interval commands

This allows executing code with a given interval. As every command, it
can be assign to any uevent.

Intervals may be useful for counting elapsed time since some action. It
allows e.g. indicating that button has been pressed for some time. This
is useful to let user know he can already release the button.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
9 years agoservice: reorder function to avoid forward declaration
Felix Fietkau [Sun, 14 Jun 2015 16:31:38 +0000 (18:31 +0200)]
service: reorder function to avoid forward declaration

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
9 years agoservice: close instance pipe fd on restart.
Yousong Zhou [Sun, 14 Jun 2015 04:14:47 +0000 (12:14 +0800)]
service: close instance pipe fd on restart.

Otherwise we hit max number of fd limit (1024) and instances fail to
start with the following errors in syslog

    Sun Jun 14 01:27:38 2015 daemon.warn procd: pipe() failed: 24 (Too many open files)

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
9 years agoservice: allow get_data of specifc instance.
Yousong Zhou [Sun, 14 Jun 2015 04:14:46 +0000 (12:14 +0800)]
service: allow get_data of specifc instance.

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
9 years agoservice: remove unused struct watch_subscribe definition.
Yousong Zhou [Sun, 14 Jun 2015 04:14:45 +0000 (12:14 +0800)]
service: remove unused struct watch_subscribe definition.

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
9 years agoservice: dump respawn params in the same order as when passed in.
Yousong Zhou [Sun, 14 Jun 2015 04:14:44 +0000 (12:14 +0800)]
service: dump respawn params in the same order as when passed in.

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
9 years agoservice: optimize relaying stdio output of daemons a bit.
Yousong Zhou [Sun, 14 Jun 2015 04:14:43 +0000 (12:14 +0800)]
service: optimize relaying stdio output of daemons a bit.

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
9 years agotrigger: make trigger_match() bool and make return value less confusing
Felix Fietkau [Tue, 2 Jun 2015 14:27:56 +0000 (16:27 +0200)]
trigger: make trigger_match() bool and make return value less confusing

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
9 years agoallow multiple identical events to be queued
John Crispin [Tue, 2 Jun 2015 00:00:03 +0000 (02:00 +0200)]
allow multiple identical events to be queued

Signed-off-by: John Crispin <blogic@openwrt.org>
9 years agoremove ->
John Crispin [Fri, 22 May 2015 23:31:22 +0000 (01:31 +0200)]
remove  ->
[    1.240000] init: failed to symlink /tmp -> /var

Signed-off-by: John Crispin <blogic@openwrt.org>
9 years agojail: respect byte order when setting AUDIT_ARCH
Daniel Golle [Sun, 17 May 2015 02:33:29 +0000 (04:33 +0200)]
jail: respect byte order when setting AUDIT_ARCH

AUDIT_ARCH on ARM and MIPS differs depending on the byte order.
Thus set AUDIT_ARCH to the respective endian-specific variants.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
9 years agojail: add support for ARM architecture
Daniel Golle [Sun, 17 May 2015 02:33:02 +0000 (04:33 +0200)]
jail: add support for ARM architecture

SECCOMP_FILTER isn't supported on ARM OABI.
Thus enable seccomp support in jail only for EABI.
thumb might work as well as it apparently implies EABI, but
yet doesn't set __ARM_EABI__.

The REG_SYSCALL macro seems to be an unused left-over.
However, it's defined for other architectures as well.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
9 years agotrace: add support for ARM architecture
Daniel Golle [Sun, 17 May 2015 02:32:45 +0000 (04:32 +0200)]
trace: add support for ARM architecture

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
9 years agoinstance: handle setgid() before setuid()
Jo-Philipp Wich [Tue, 5 May 2015 09:08:24 +0000 (11:08 +0200)]
instance: handle setgid() before setuid()

When attempting to run a service with an unprivileged user and group
id procd, the following error might occur:

procd: failed to set uid:1000, gid:1000

This is due to the fact that procd first performs the setuid(), then
the setgid() call.

Usually there no sufficient permissions after a setuid() anymore to
change the effective group id of the process.

Refactor the code to:

  * Swap the invocations (first gid, then uid)
  * Don't set user or group id if it is 0
  * Handle errors independently and make them more verbose

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
9 years agoinstance: avoid dumping invalid service instances - prevents a potential crash
Felix Fietkau [Sun, 19 Apr 2015 15:14:59 +0000 (17:14 +0200)]
instance: avoid dumping invalid service instances - prevents a potential crash

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
9 years agofix include order
John Crispin [Thu, 9 Apr 2015 22:39:16 +0000 (00:39 +0200)]
fix include order

this broke x86_64 builds on uclibc

Signed-off-by: John Crispin <blogic@openwrt.org>
9 years agoproperly handle return codes
John Crispin [Sat, 28 Mar 2015 14:41:58 +0000 (15:41 +0100)]
properly handle return codes

Signed-off-by: John Crispin <blogic@openwrt.org>
9 years agomake it optional to remount the tmpfs as ro
John Crispin [Fri, 27 Mar 2015 01:27:16 +0000 (02:27 +0100)]
make it optional to remount the tmpfs as ro

Signed-off-by: John Crispin <blogic@openwrt.org>
9 years agomake jail build optional
John Crispin [Thu, 26 Mar 2015 18:21:14 +0000 (19:21 +0100)]
make jail build optional

Signed-off-by: John Crispin <blogic@openwrt.org>
9 years agoprocd can now start jailed processes
John Crispin [Sat, 21 Mar 2015 13:11:15 +0000 (14:11 +0100)]
procd can now start jailed processes

Signed-off-by: John Crispin <blogic@openwrt.org>
9 years agoadd initial version of ujail and utrace
John Crispin [Sat, 21 Mar 2015 10:47:01 +0000 (11:47 +0100)]
add initial version of ujail and utrace

Signed-off-by: John Crispin <blogic@openwrt.org>
9 years agocheck for empty parameters in askfirst
Zefir Kurtisi [Wed, 18 Mar 2015 15:44:48 +0000 (16:44 +0100)]
check for empty parameters in askfirst

Signed-off-by: Zefir Kurtisi <zefir.kurtisi@neratec.com>
9 years agoswitch to _DEFAULT_SOURCE for modern glibc compat
John Crispin [Thu, 12 Mar 2015 12:54:01 +0000 (13:54 +0100)]
switch to _DEFAULT_SOURCE for modern glibc compat

Signed-off-by: Jeff Waugh <jdub@bethesignal.org>
9 years agojson 0.12 fixes
John Crispin [Fri, 6 Mar 2015 16:46:04 +0000 (17:46 +0100)]
json 0.12 fixes
Signed-off-by: John Crispin <blogic@openwrt.org>
9 years agoservice: rename variables / struct members called stdout, stderr to avoid conflicts...
Felix Fietkau [Fri, 27 Feb 2015 07:28:35 +0000 (20:28 +1300)]
service: rename variables / struct members called stdout, stderr to avoid conflicts with system defines

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
9 years agoservice: don't use stdio log channel
Jo-Philipp Wich [Thu, 26 Feb 2015 14:23:59 +0000 (15:23 +0100)]
service: don't use stdio log channel

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
9 years agoprocd: support relayoing daemon stdout/stderr to syslog
Jo-Philipp Wich [Thu, 26 Feb 2015 11:27:39 +0000 (12:27 +0100)]
procd: support relayoing daemon stdout/stderr to syslog

This commit adds support to procd for relaying stdout and stderr streams to
the system log. That is mainly useful for services not using syslog, e.g.
uhttpd.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
9 years agoConvert log calls to ulog() api
Jo-Philipp Wich [Wed, 25 Feb 2015 22:52:03 +0000 (23:52 +0100)]
Convert log calls to ulog() api

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
9 years agoprocd: increase memory allocated for tmpfs on zram
Nathan Hintz [Sat, 24 Jan 2015 03:36:47 +0000 (19:36 -0800)]
procd: increase memory allocated for tmpfs on zram

Devices with <= 32MB of ram get half of memory allocated to zram (up to 16MB).
Devices with > 32MB of ram get just 8MB of memory allocated to zram.

Increase memory allocated to devices with > 32MB ram to 16MB.

Signed-off-by: Nathan Hintz <nlhintz@hotmail.com>
9 years agoMake build of upgraded optional
Jo-Philipp Wich [Sun, 25 Jan 2015 16:05:46 +0000 (17:05 +0100)]
Make build of upgraded optional

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
9 years agosystem: increase memory field sizes to 64bit
Jo-Philipp Wich [Thu, 15 Jan 2015 11:32:36 +0000 (12:32 +0100)]
system: increase memory field sizes to 64bit

On an Alix APU board with 4GB of available ram, the total memory is reported
as "-179417088" bytes. Increase the ubus field sizes to 64bit integers in
order to avoid overflows.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
9 years agosystem: attempt to parse /proc/device-tree/model
Jo-Philipp Wich [Thu, 15 Jan 2015 11:17:21 +0000 (12:17 +0100)]
system: attempt to parse /proc/device-tree/model

Fallback to /proc/device-tree/model if /tmp/sysinfo/model is not available.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
9 years agosystem: improve system name detection
Jo-Philipp Wich [Thu, 15 Jan 2015 10:51:52 +0000 (11:51 +0100)]
system: improve system name detection

Skip entries like "Processor: 0" which are common on x86, otherwise
an "ubus call system board" will just return "system: 0".

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
9 years agoinittab: don't close fds unconditionally since this breaks UML
Steven Barth [Fri, 9 Jan 2015 08:39:22 +0000 (09:39 +0100)]
inittab: don't close fds unconditionally since this breaks UML

Signed-off-by: Steven Barth <steven@midlink.org>
9 years agoonly write to the watchdog if the fd is valid
John Crispin [Sun, 14 Dec 2014 21:12:45 +0000 (22:12 +0100)]
only write to the watchdog if the fd is valid

Signed-off-by: John Crispin <blogic@openwrt.org>
9 years agoprevious commit accidentiall dropped the cgroup mount
John Crispin [Tue, 2 Dec 2014 12:40:11 +0000 (13:40 +0100)]
previous commit accidentiall dropped the cgroup mount

Signed-off-by: John Crispin <blogic@openwrt.org>
9 years agoadd support for zram compressed tmpfs
John Crispin [Fri, 28 Nov 2014 00:27:57 +0000 (01:27 +0100)]
add support for zram compressed tmpfs

Signed-off-by: John Crispin <blogic@openwrt.org>
9 years agoservice: fix ubus list command
Felix Fietkau [Wed, 19 Nov 2014 16:36:58 +0000 (17:36 +0100)]
service: fix ubus list command

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
10 years agoinitd: mount cgroup
Luka Perkov [Tue, 11 Nov 2014 12:28:19 +0000 (12:28 +0000)]
initd: mount cgroup

If kernel is compiled with cgroup support it should be mounted. This change
does not effect kernels without cgroup support.

Signed-off-by: Luka Perkov <luka@openwrt.org>
10 years agoinittab: clean up tty opening code, fix console shell job control issues
Felix Fietkau [Sat, 8 Nov 2014 18:07:46 +0000 (19:07 +0100)]
inittab: clean up tty opening code, fix console shell job control issues

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
10 years agocall setsid during startup.
John Crispin [Wed, 5 Nov 2014 15:22:31 +0000 (16:22 +0100)]
call setsid during startup.

this fixes a bug where pgrp was not set up properly leading to a trail of carnage;

Signed-off-by: John Crispin <blogic@openwrt.org>
10 years agokmodloader takes longer than wdt timeout
John Crispin [Sat, 1 Nov 2014 22:23:47 +0000 (23:23 +0100)]
kmodloader takes longer than wdt timeout

on systms with slow flash the watchdog will trigger when a lot of modules are
included in the image.

Signed-off-by: John Crispin <blogic@openwrt.org>
10 years agoget_cmdline_val: search for entire name, not just suffix
Steven Barth [Wed, 5 Nov 2014 10:17:09 +0000 (11:17 +0100)]
get_cmdline_val: search for entire name, not just suffix

also fix writing of 0-byte to buffer

Signed-off-by: Steven Barth <steven@midlink.org>
10 years agoprocd: Make askconsole work again when no tty is specified in inittab
Michel Stam [Tue, 4 Nov 2014 16:40:16 +0000 (17:40 +0100)]
procd: Make askconsole work again when no tty is specified in inittab

Consider:
::askconsole:/bin/ash --login

askconsole( ) checks for the existance of the tty, but if none is
specified it will skip the remainder of the function. This means
fork_worker( ) is never called and no process is spawned. This
would leave routers without an initial console.

Signed-off-by: Michel Stam <m.stam@fugro.nl>
10 years agoHonour tty field in /etc/inittab
Michel Stam [Tue, 4 Nov 2014 15:50:54 +0000 (16:50 +0100)]
Honour tty field in /etc/inittab

The problem was caused by procd not opening /dev/tty* (whichever was
specified for the ID field /etc/inittab), causing /proc/PID/fd to
point to /dev/console instead.

This is a rework of e63051d9, which did not initialise the console
pointer and did not check the tty pointer in askconsole. askfirst
was not completely fixed as it expected the console parameter on
the commandline, which is no longer necessary because procd opens
the console prior to fork()-ing.

Signed-off-by: Michel Stam <m.stam@fugro.nl>
10 years agoRevert "Honour tty field in /etc/inittab"
Steven Barth [Sat, 1 Nov 2014 13:11:57 +0000 (14:11 +0100)]
Revert "Honour tty field in /etc/inittab"

This reverts commit e63051d9843ddbafb1fabfd97d60e853bdeac129.
This unbreaks the initial console on UML and possibly other platforms.

Signed-off-by: Steven Barth <cyrus@openwrt.org>
10 years agoFix regression in command line parsing
Steven Barth [Fri, 31 Oct 2014 12:05:47 +0000 (13:05 +0100)]
Fix regression in command line parsing

79872ea6 reduced the command line buffer breaking various platforms.

Signed-off-by: Steven Barth <steven@midlink.org>
10 years agoLog startup/shutdown to console
John Crispin [Thu, 30 Oct 2014 10:07:26 +0000 (11:07 +0100)]
Log startup/shutdown to console

procd has the habit of logging startup/shutdown via
rcS to syslog, which is pointless in case of a
shutdown, and unlikely to be complete on a startup
(as syslog is not running). Write to the console
instead.

Signed-off-by: Michel Stam <m.stam@fugro.nl>
Signed-off-by: John Crispin <blogic@openwrt.org>
10 years agominor fixes to michels patches
John Crispin [Sun, 12 Oct 2014 12:54:29 +0000 (14:54 +0200)]
minor fixes to michels patches

Signed-off-by: John Crispin <blogic@openwrt.org>
10 years agoHonour tty field in /etc/inittab
Michel Stam [Mon, 13 Oct 2014 14:14:37 +0000 (16:14 +0200)]
Honour tty field in /etc/inittab

The problem was caused by procd not opening /dev/tty* (whichever was
specified for the ID field /etc/inittab), causing /proc/PID/fd to
point to /dev/console instead.

Signed-off-by: Michel Stam <m.stam@fugro.nl>
10 years agoFix ctrl+alt+del support
Michel Stam [Mon, 13 Oct 2014 14:14:36 +0000 (16:14 +0200)]
Fix ctrl+alt+del support

The previous patch did not catch SIGINT, which is used by the
kernel to indicate to the init process that the system should
reboot.

Signed-off-by: Michel Stam <m.stam@fugro.nl>
10 years agoShow the shutdown sequence on the active virtual terminal
Michel Stam [Mon, 13 Oct 2014 14:14:35 +0000 (16:14 +0200)]
Show the shutdown sequence on the active virtual terminal

procd by default writes to /dev/console. When rebooting, this means that the
terminal on which the reboot sequence was started will not see what is going
on. This patch fixes that by reopening stdin, stdout and stderr to the console
device specified on the commandline, /dev/tty0 or /dev/console upon reboot.

Also, due to (probably) pivot-root, /proc/1/fd shows 1-3 pointing to
/console. This patch also fixes that.

Signed-off-by: Michel Stam <m.stam@fugro.nl>
10 years agoUse one generic routine to access /proc/cmdline
Michel Stam [Mon, 13 Oct 2014 14:14:34 +0000 (16:14 +0200)]
Use one generic routine to access /proc/cmdline

Signed-off-by: Michel Stam <m.stam@fugro.nl>
10 years agomake procd wait for ubus to come up
John Crispin [Mon, 6 Oct 2014 18:15:24 +0000 (20:15 +0200)]
make procd wait for ubus to come up

Signed-off-by: John Crispin <blogic@openwrt.org>
10 years agoFix scroll lock blocking procd
John Crispin [Mon, 6 Oct 2014 18:13:28 +0000 (20:13 +0200)]
Fix scroll lock blocking procd

On x86, pressing the scrolllock button may effectively prevent procd from rebooting
the system. This happens because procd tries to write to /dev/console, which in that
situation is blocked, effectively blocking procd from rebooting the system.

This patch puts procd's stderr access into non-blocking, which will prevent the
boot from being stuck.

Signed-off-by: Michel Stam <m.stam@fugro.nl>
10 years agomake procd handle ctrl+alt+del
John Crispin [Thu, 2 Oct 2014 17:39:56 +0000 (19:39 +0200)]
make procd handle ctrl+alt+del

Signed-off-by: John Crispin <blogic@openwrt.org>
10 years agoFix 'reboot' message when the system is powering down
Michel Stam [Thu, 2 Oct 2014 11:56:23 +0000 (11:56 +0000)]
Fix 'reboot' message when the system is powering down

While executing a system halt (via the powerbutton or otherwise),
the system displays rebooting, whereas it should display that
it is going to turn off.

Signed-off-by: Michel Stam <m.stam@fugro.nl>
10 years agoReboot busybox style via procd
Michel Stam [Thu, 2 Oct 2014 11:56:21 +0000 (11:56 +0000)]
Reboot busybox style via procd

It has been observed that, very rarely, the system does not reboot
when procd enters the shutdown state. Busybox seems to have an
obscure fix in its shutdown, where the parent (procd) process
is put in an infinite loop, and a special child is executed to
execute reboot(). This may very well be the cause.

Signed-off-by: Michel Stam <m.stam@fugro.nl>
10 years agoKill processes on shutdown
Michel Stam [Thu, 2 Oct 2014 11:56:20 +0000 (11:56 +0000)]
Kill processes on shutdown

Procd as it currently is does not kill the running processes during shutdown.
As this might cause undesired behaviour, this should be implemented.
Implementation was taken from busybox 1.19.4

Signed-off-by: Michel Stam <m.stam@fugro.nl>
10 years agoFix procd not handling rapid reboot signals very well
Michel Stam [Thu, 2 Oct 2014 11:56:16 +0000 (11:56 +0000)]
Fix procd not handling rapid reboot signals very well

When keeping ctrl-alt-del pressed, or when running;
while true; do
    /sbin/reboot
done
effectively the procd shutdown cycle gets into an undefined state,

Signed-off-by: Michel Stam <m.stam@fugro.nl>
10 years agofix a copy/paste bug leading to a bad loop limitation
John Crispin [Sat, 13 Sep 2014 01:15:21 +0000 (03:15 +0200)]
fix a copy/paste bug leading to a bad loop limitation

https://dev.openwrt.org/ticket/17864

Signed-off-by: John Crispin <blogic@openwrt.org>
10 years agofix timeout on shutdown
John Crispin [Sat, 13 Sep 2014 01:07:48 +0000 (03:07 +0200)]
fix timeout on shutdown

Signed-off-by: John Crispin <blogic@openwrt.org>
10 years agoinstances can now start as a !root user
John Crispin [Sun, 7 Sep 2014 23:30:24 +0000 (01:30 +0200)]
instances can now start as a !root user

Signed-off-by: John Crispin <blogic@openwrt.org>
10 years agoadd .data to instance_dump()
John Crispin [Wed, 27 Aug 2014 11:50:24 +0000 (13:50 +0200)]
add .data to instance_dump()

Signed-off-by: John Crispin <blogic@openwrt.org>
10 years agoadd an event for "service.update" triggers
John Crispin [Wed, 27 Aug 2014 08:55:00 +0000 (10:55 +0200)]
add an event for "service.update" triggers

Signed-off-by: John Crispin <blogic@openwrt.org>
10 years agohotplug: avoid using the deprecated is_error() call, check for NULL pointer instead
Felix Fietkau [Fri, 29 Aug 2014 11:25:17 +0000 (13:25 +0200)]
hotplug: avoid using the deprecated is_error() call, check for NULL pointer instead

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
10 years agoexplicitly include json/json.h where needed
Felix Fietkau [Fri, 29 Aug 2014 11:23:57 +0000 (13:23 +0200)]
explicitly include json/json.h where needed

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
10 years agosystem.c: parse quoted version info from /etc/openwrt_release
Felix Fietkau [Wed, 30 Jul 2014 12:40:22 +0000 (14:40 +0200)]
system.c: parse quoted version info from /etc/openwrt_release

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
10 years agoMake failure to resize hotplug buffer non-fatal
Steven Barth [Tue, 29 Jul 2014 06:50:37 +0000 (08:50 +0200)]
Make failure to resize hotplug buffer non-fatal

Some architectures seem to have broken SO_RCVBUFFORCE.

Signed-off-by: Steven Barth <steven@midlink.org>
10 years agohotplug: fix firmware loading
Felix Fietkau [Fri, 18 Jul 2014 14:40:56 +0000 (16:40 +0200)]
hotplug: fix firmware loading

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
10 years agoservice: fix trigger related double-free
Felix Fietkau [Wed, 2 Jul 2014 19:04:52 +0000 (21:04 +0200)]
service: fix trigger related double-free

The memdup is unnecessary, because the data is contained inside
in->config.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
10 years agoservice: implement get_data to dump the data fields for every instance
Felix Fietkau [Wed, 2 Jul 2014 17:00:32 +0000 (19:00 +0200)]
service: implement get_data to dump the data fields for every instance

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
10 years agoinstance: allow filling "data" with fields of arbitrary type
Felix Fietkau [Wed, 2 Jul 2014 17:00:11 +0000 (19:00 +0200)]
instance: allow filling "data" with fields of arbitrary type

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
10 years agomake static linking work for upgraded
John Crispin [Thu, 19 Jun 2014 11:16:08 +0000 (12:16 +0100)]
make static linking work for upgraded

Signed-off-by: John Crispin <blogic@openwrt.org>
10 years agoonly build upgraded on mips
John Crispin [Tue, 17 Jun 2014 16:16:25 +0000 (17:16 +0100)]
only build upgraded on mips

Signed-off-by: John Crispin <blogic@openwrt.org>
10 years agomove upgrade to its own subfolder
John Crispin [Mon, 16 Jun 2014 16:43:03 +0000 (17:43 +0100)]
move upgrade to its own subfolder

Signed-off-by: John Crispin <blogic@openwrt.org>
10 years agorename the folder option to path
John Crispin [Mon, 16 Jun 2014 15:52:18 +0000 (16:52 +0100)]
rename the folder option to path

Signed-off-by: John Crispin <blogic@openwrt.org>
10 years agoprocd: force -lc -lgcc to handle cross-dependencies between those two
Felix Fietkau [Wed, 11 Jun 2014 17:48:16 +0000 (19:48 +0200)]
procd: force -lc -lgcc to handle cross-dependencies between those two

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
10 years agoIncrease buffers for hotplug and cmdline for UML
Steven Barth [Wed, 11 Jun 2014 13:23:39 +0000 (15:23 +0200)]
Increase buffers for hotplug and cmdline for UML

Thanks to Markus Stenberg for debugging and testing.

Signed-off-by: Steven Barth <steven@midlink.org>
10 years agoonly add the nandupgrade method when /sbin/upgraded exists
John Crispin [Wed, 11 Jun 2014 01:37:08 +0000 (02:37 +0100)]
only add the nandupgrade method when /sbin/upgraded exists

Signed-off-by: John Crispin <blogic@openwrt.org>
10 years agoadd upgraded support for nand flashing
John Crispin [Tue, 10 Jun 2014 15:50:15 +0000 (16:50 +0100)]
add upgraded support for nand flashing

Signed-off-by: John Crispin <blogic@openwrt.org>
10 years agoallow instances to report errors. if an error is set, the instance wont be started
John Crispin [Thu, 5 Jun 2014 13:02:29 +0000 (14:02 +0100)]
allow instances to report errors. if an error is set, the instance wont be started

Signed-off-by: John Crispin <blogic@openwrt.org>
10 years agoservice: do not emit any service events before the ubus connection is up
Felix Fietkau [Thu, 5 Jun 2014 14:53:29 +0000 (16:53 +0200)]
service: do not emit any service events before the ubus connection is up

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
10 years agoservice: register the subscriber object before the event handler
Felix Fietkau [Thu, 5 Jun 2014 14:46:32 +0000 (16:46 +0200)]
service: register the subscriber object before the event handler

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
10 years agoservice: fix a debug message typo
Felix Fietkau [Thu, 5 Jun 2014 14:45:21 +0000 (16:45 +0200)]
service: fix a debug message typo

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
10 years agoservice: fix a leftover debug hack
Felix Fietkau [Thu, 5 Jun 2014 14:44:29 +0000 (16:44 +0200)]
service: fix a leftover debug hack

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
10 years ago0467aebb79f64d1c9d05a84367fda7c02c4ea6b8 included too much
John Crispin [Thu, 5 Jun 2014 10:53:01 +0000 (11:53 +0100)]
0467aebb79f64d1c9d05a84367fda7c02c4ea6b8 included too much

Signed-off-by: John Crispin <blogic@openwrt.org>
10 years agowait for kmod loader to complete on first boot
John Crispin [Wed, 4 Jun 2014 19:55:58 +0000 (20:55 +0100)]
wait for kmod loader to complete on first boot

Signed-off-by: John Crispin <blogic@openwrt.org>
10 years agosend ubus_notify events when servers and instances change state
John Crispin [Wed, 4 Jun 2014 19:50:00 +0000 (20:50 +0100)]
send ubus_notify events when servers and instances change state

Signed-off-by: John Crispin <blogic@openwrt.org>
10 years agoadd wildcard support to trigger matching code
John Crispin [Wed, 4 Jun 2014 18:36:03 +0000 (19:36 +0100)]
add wildcard support to trigger matching code

Signed-off-by: John Crispin <blogic@openwrt.org>
10 years agoallow instances to register ubus object that should be watched
John Crispin [Wed, 4 Jun 2014 11:46:28 +0000 (12:46 +0100)]
allow instances to register ubus object that should be watched

Signed-off-by: John Crispin <blogic@openwrt.org>
10 years agoservice: fix json object leak in validate code
Felix Fietkau [Sun, 25 May 2014 19:29:36 +0000 (21:29 +0200)]
service: fix json object leak in validate code

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
10 years agoservice: free trigger json_script context
Felix Fietkau [Sun, 25 May 2014 19:24:09 +0000 (21:24 +0200)]
service: free trigger json_script context

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
10 years agoservice: fix trigger data memleak
Felix Fietkau [Sun, 25 May 2014 19:15:05 +0000 (21:15 +0200)]
service: fix trigger data memleak

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
10 years agoservice: ensure that trigger timers are always cancelled before free
Felix Fietkau [Sun, 25 May 2014 19:12:49 +0000 (21:12 +0200)]
service: ensure that trigger timers are always cancelled before free

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
10 years agoservice: fix memleak in trigger handling
Felix Fietkau [Sun, 25 May 2014 19:04:46 +0000 (21:04 +0200)]
service: fix memleak in trigger handling

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
10 years agoservice: use avl_remove_all_elements()
Felix Fietkau [Sun, 25 May 2014 19:01:30 +0000 (21:01 +0200)]
service: use avl_remove_all_elements()

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
10 years agoservice: remove unused argument to service_update()
Felix Fietkau [Sun, 25 May 2014 18:59:56 +0000 (20:59 +0200)]
service: remove unused argument to service_update()

Signed-off-by: Felix Fietkau <nbd@openwrt.org>