Cleanup device creation and initial mount by assuming that the kernel
has devtmpfs enabled. This is the default for most modern GNU/Linux
distributions. See http://lwn.net/Articles/331818/ for more info.
Also, since finit is targeted at deeply embedded systems hooks for the
BusyBox udev replacement, mdev has been added. If MDEV is defined in
the build it will take care of both hotplugging of devices and initial
setup of /dev
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
Check for "--verbose", as well as "finit_debug", on kernel command
line to enable debugging of finit. The former is a compatibility
option with upstart, see http://upstart.ubuntu.com/wiki/Debugging
Add the following to the kernel command line to enable:
"init=/sbin/finit --verbose"
Without the quote characters.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
finit.c:
Skip standard UNIX comment character '#' if it appears at the
beginning of a row in finit.conf
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
finit.c:
o Perform signal setup as soon as possible, no need to do any
mounting of /proc or /sys beforehand
o Move signal setup and callbacks to a file of its own
o Use more #defines for hard coded strings
o Use a more neutral default hostname
signal.c:
o New file, for setup and signal handlers
o Add support for SIGSTOP/SIGSTP and SIGCONT. This pauses finit
respawning of xinit/shell. Useful for, e.g., debugging
o Document each ignored and handled signal better
o Disable SIGUSR1 and SIGUSR2 for now, will be reenabled later
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is in preparation for importing the Westermo code changes.
Slowly refactoring the finit core into a more modularized unit to be a
bit more maintainable.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This is a followup to Olivier Blin's patch from 88ffb93 in that it
applies the same patch to finit-mod.c that is already in finit.c, or
finit-alt.c as it was called then.
Also, the optional --directisa argument to hwclock is not necessary.
The hwclock utility has a built-in fallback to use excplicit I/O over
the /dev/rtc in case the latter does not exist. See the hwclock(8) man
page for more information on this.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
o Make finit-alt.c the new finit.c, save old finit.c as finit-org.c
o Keep original finit-alt.c for reference.
o Update README and ChangeLog with direction of this fork
o Correct ChangeLog date for v0.1 and set release date for
the 0.6-pre release to 20100614, which is the last commit
by the original author.
o Add standard LICENSE file for MIT License
o Add standard AUTHORS file to document history of project
o Bump version to 1.0-pre to distance fork from original
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
Example:
gcc -c -Os -Wall -DVERSION=\"0.6-pre\" -DWHOAMI=\"`whoami`@`hostname`\" -march=pentium-m -DBUILTIN_RUNPARTS -o finit-mod.o finit-mod.c
finit-mod.c: In function ‘main’:
finit-mod.c:107: warning: ignoring return value of ‘chdir’, declared with attribute warn_unused_result
finit-mod.c:137: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result
finit-mod.c:164: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result
finit-mod.c:168: warning: ignoring return value of ‘system’, declared with attribute warn_unused_result
Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
Unsetting TERM in distributions using bash as /bin/sh prevents execution
of loadkeys from bashrc when creating the user environment to run X
Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
Fsck filesystems before mounting root as read-write. Mountdev and
device creation can stay there because they're tmpfs.
Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>