summaryrefslogtreecommitdiffstats
path: root/inittab.c
AgeCommit message (Collapse)Author
2015-01-09inittab: don't close fds unconditionally since this breaks UMLSteven Barth
Signed-off-by: Steven Barth <steven@midlink.org>
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-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-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-12Use one generic routine to access /proc/cmdlineMichel Stam
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-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>
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-07-08bugfix of error handling while open()Thomas Huehn
The normal return value from open() is a non-negative integer. In the case of an error, a value of -1 is returned instead. Signed-off-by: Thomas Huehn <thomas@net.t-labs.tu-berlin.de>
2013-06-24add respawn supportJohn Crispin
https://dev.openwrt.org/ticket/13751 Signed-off-by: John Crispin <blogic@openwrt.org>
2013-05-09add a rcS helperJohn Crispin
Signed-off-by: John Crispin <blogic@openwrt.org>
2013-03-13add inittab supportJohn Crispin