This patch fixes a build problem when configured without inetd support.
Signed-off-by: Markus Svilans <msvilans@aeonyx.ca>
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
- Add support for SysV init setenv to activate poweroff
- Update help text considerably to be more helpful
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
The UTMP db tracks currently logged in users and WTMP is an audit trail
of all user logins and logouts, as well as runlevel changes and reboot.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
The new logit() function takes care to print to stderr if syslogd has
not yet started. The _d(), _e(), and _pe() macros have an additional
requirement: to always print on stderr.
After the boot we also want to see what happned during, so this patch
simply adds syslog() support to _d(), _e(), and _pe().
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This patch removes internal logging macros and adds support for logging
to stderr until a syslogd is up and running, i.e. /dev/log appears.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This patch removes accounting for all processes to instead implement the
traditional SysV getty accounting. (Telnet/SSH et al maintain their own
accounding for UTMP.)
TODO: WTMP support
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This patch fixes the /etc/grub.d/40_custom generation for the Debian
sample so that it properly extracts the UUID For /boot and /
Note: the maintenance free symlinks /vmlinuz and /initrd.img may not
work properly with /boot on a separate partition or disk. If only
the symlinks where in /boot as well ...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
Instead of ugly #ifdefs we now probe for mdev or udevd at runtime. Take
care to check for udev-finalize and location of udevd, it differs a lot
between distros.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This patch adds initial support for handling MD RAID arrays. Adding
a pass at the very end of the shutdown sequence to signal any external
RAID controller to clear its state before we proceed to halt/reboot.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This patch adds support for a more fine grained approach to what
filesystems are unmounted at shutdown/reboot. This so we later
can add support for `mdadm --wait-clean --scan`, which relies on
/proc, /sys, and /dev being there before we call reboot().
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
Also, this code will be refactored soon to be a part of the finit
binary, like telinit, and then we will be called after unmount to
do a forced halt/reboot/poweroff.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This patch is a complete rewrite of the Finit reboot command. Not only
does it bring it up to speed with the new signal model, but it also adds
new features like poweroff, halt, and suspend -- including a forced mode
that goes for reboot(2) immediately.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
Still TODO, replace `run_interactive()` start of dbus-daemon with a
proper service. Possibly only service_register() is needed.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This patch fixes the ordering of UTMP events. The first event that is
expected in /var/run/utmp is reboot, next is the runlevel change to
the configured runlevel, e.g. from S --> 2.
Let the bootmisc plugin handle this, it knows when /var/run/utmp has
been created and is writable. It is not the eact boot time, but close
enough for most usees.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This patch adds support for initializing /var/run/utmp with the initial
reboot as well as a shutdown record in the UTMP db.
Also, the run level change now properly records ~ and ~~ as line and id,
respectively, and the kernel release and time of each UTMP record is now
set properly.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
Minor coding style cleanup, code simplification, and change service
'crashing' status text to 'crashed' to fit column width.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>