summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2014-11-08inittab: clean up tty opening code, fix console shell job control issuesFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-11-05call setsid during startup.John Crispin
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>
2014-11-05kmodloader takes longer than wdt timeoutJohn Crispin
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>
2014-11-05get_cmdline_val: search for entire name, not just suffixSteven Barth
also fix writing of 0-byte to buffer Signed-off-by: Steven Barth <steven@midlink.org>
2014-11-04procd: Make askconsole work again when no tty is specified in inittabMichel Stam
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>
2014-11-04Honour tty field in /etc/inittabMichel Stam
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>
2014-11-01Revert "Honour tty field in /etc/inittab"Steven Barth
This reverts commit e63051d9843ddbafb1fabfd97d60e853bdeac129. This unbreaks the initial console on UML and possibly other platforms. Signed-off-by: Steven Barth <cyrus@openwrt.org>
2014-10-31Fix regression in command line parsingSteven Barth
79872ea6 reduced the command line buffer breaking various platforms. Signed-off-by: Steven Barth <steven@midlink.org>
2014-10-30Log startup/shutdown to consoleJohn Crispin
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>
2014-10-12minor fixes to michels patchesJohn Crispin
Signed-off-by: John Crispin <blogic@openwrt.org>
2014-10-12Honour tty field in /etc/inittabMichel Stam
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>
2014-10-12Fix ctrl+alt+del supportMichel Stam
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>
2014-10-12Show the shutdown sequence on the active virtual terminalMichel Stam
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>
2014-10-12Use one generic routine to access /proc/cmdlineMichel Stam
Signed-off-by: Michel Stam <m.stam@fugro.nl>
2014-10-06make procd wait for ubus to come upJohn Crispin
Signed-off-by: John Crispin <blogic@openwrt.org>
2014-10-06Fix scroll lock blocking procdJohn Crispin
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>
2014-10-02make procd handle ctrl+alt+delJohn Crispin
Signed-off-by: John Crispin <blogic@openwrt.org>
2014-10-02Fix 'reboot' message when the system is powering downMichel Stam
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>
2014-10-02Reboot busybox style via procdMichel Stam
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>
2014-10-02Kill processes on shutdownMichel Stam
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>
2014-10-02Fix procd not handling rapid reboot signals very wellMichel Stam
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>
2014-09-13fix a copy/paste bug leading to a bad loop limitationJohn Crispin
https://dev.openwrt.org/ticket/17864 Signed-off-by: John Crispin <blogic@openwrt.org>
2014-09-13fix timeout on shutdownJohn Crispin
Signed-off-by: John Crispin <blogic@openwrt.org>
2014-09-08instances can now start as a !root userJohn Crispin
Signed-off-by: John Crispin <blogic@openwrt.org>
2014-08-29add .data to instance_dump()John Crispin
Signed-off-by: John Crispin <blogic@openwrt.org>
2014-08-29add an event for "service.update" triggersJohn Crispin
Signed-off-by: John Crispin <blogic@openwrt.org>
2014-08-29hotplug: avoid using the deprecated is_error() call, check for NULL pointer ↵Felix Fietkau
instead Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-08-29explicitly include json/json.h where neededFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-07-30system.c: parse quoted version info from /etc/openwrt_releaseFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-07-29Make failure to resize hotplug buffer non-fatalSteven Barth
Some architectures seem to have broken SO_RCVBUFFORCE. Signed-off-by: Steven Barth <steven@midlink.org>
2014-07-18hotplug: fix firmware loadingFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-07-02service: fix trigger related double-freeFelix Fietkau
The memdup is unnecessary, because the data is contained inside in->config. Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-07-02service: implement get_data to dump the data fields for every instanceFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-07-02instance: allow filling "data" with fields of arbitrary typeFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-06-19make static linking work for upgradedJohn Crispin
Signed-off-by: John Crispin <blogic@openwrt.org>
2014-06-17only build upgraded on mipsJohn Crispin
Signed-off-by: John Crispin <blogic@openwrt.org>
2014-06-16move upgrade to its own subfolderJohn Crispin
Signed-off-by: John Crispin <blogic@openwrt.org>
2014-06-16rename the folder option to pathJohn Crispin
Signed-off-by: John Crispin <blogic@openwrt.org>
2014-06-11procd: force -lc -lgcc to handle cross-dependencies between those twoFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-06-11Increase buffers for hotplug and cmdline for UMLSteven Barth
Thanks to Markus Stenberg for debugging and testing. Signed-off-by: Steven Barth <steven@midlink.org>
2014-06-11only add the nandupgrade method when /sbin/upgraded existsJohn Crispin
Signed-off-by: John Crispin <blogic@openwrt.org>
2014-06-11add upgraded support for nand flashingJohn Crispin
Signed-off-by: John Crispin <blogic@openwrt.org>
2014-06-06allow instances to report errors. if an error is set, the instance wont be ↵John Crispin
started Signed-off-by: John Crispin <blogic@openwrt.org>
2014-06-05service: do not emit any service events before the ubus connection is upFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-06-05service: register the subscriber object before the event handlerFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-06-05service: fix a debug message typoFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-06-05service: fix a leftover debug hackFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-06-050467aebb79f64d1c9d05a84367fda7c02c4ea6b8 included too muchJohn Crispin
Signed-off-by: John Crispin <blogic@openwrt.org>
2014-06-05wait for kmod loader to complete on first bootJohn Crispin
Signed-off-by: John Crispin <blogic@openwrt.org>
2014-06-05send ubus_notify events when servers and instances change stateJohn Crispin
Signed-off-by: John Crispin <blogic@openwrt.org>