Commit Graph

205 Commits

Author SHA1 Message Date
Jesse Smith
f064d8f4b9 Added reference to readbootlog to the bootlogd manual page. This
should allow Debian bug #725123 to be closed.
2018-11-12 20:58:44 -04:00
Jesse Smith
5d3815b0ff Added manual page and options for readbootlog. 2018-11-12 20:53:52 -04:00
Jesse Smith
7c1a8d932a Added new tool (readbootlog) which will read the /var/log/boot file
produced by bootlogd. The output is displayed cleaned up so there
are no control characters. This avoids the need to use sed or related
tools to try to clean up the contents of the log.
2018-11-12 20:29:28 -04:00
Jesse Smith
aa6873b85b Removed typos from pidof manual page and killall5 page.
Closes Debian bugs #815839, #905245 and #890478

Added -f <format> option to pidof program to allow printf
style formating.
Closes Debian bug #571590
Thanks to Philipp Marek for the patch.
2018-11-10 21:27:11 -04:00
Jesse Smith
2ece2c0364 Updated src/Makefile to confirm we build all the necessary software
prior to trying to install it.
2018-11-07 17:24:55 -04:00
Jesse Smith
848ee05104 Updated init manual page to include GRUB in boot loader comment
as LILO is rarely used outside of the Slackware family these days.

Switched stty flags to use ECHOE instead of ECHOPRT. This should
give smoother, more natural backspac-erase behaviour on emergency
consoles. (Created in init -b mode.)
2018-11-05 23:15:11 -04:00
Jesse Smith
2fd897ff3a Fixed typo in changelog. 2018-11-01 22:06:14 -03:00
Jesse Smith
c45219c64f Added -q and -Q flags to shutdown command to make the "system is going down"
message appear less often. The -q flag causes messages to only appear at the
10 minute, 5 minute and x-hour intervals.
The -Q flag maintains complete silence up until the final "now" warning.
2018-11-01 17:21:47 -03:00
Jesse Smith
44fce86dde Added -l flag to "last" command. When used it allows "last" to
display usernames longer than 8 characters long.
2018-10-30 21:46:04 -03:00
Jesse Smith
be8e6b9e1c shutdown command was setting environment variable INIT_HALT to
"POWERDOWN", this should have been "POWERDOWN" as specified in the
manual page. Fixed code to match manual page and init scripts.
2018-10-28 16:19:26 -03:00
Jesse Smith
a17f736a42 Applied patch from Regid Ichira to clarify shutdown command
line options. Updated manual page for shutdown.
Closes Debian bug #630661.
2018-10-27 20:37:47 -03:00
Jesse Smith
1b659c8ebe Applied patch from Daniel Povey which should allow killall5/pidof to
avoid locking up if it encounters stopped or zombie processes
due to broken NFS mount points.
This should allow Debian bug #719273 to be closed.
2018-10-27 20:26:15 -03:00
Jesse Smith
b4f8539153 Addressed man page documentation to warn the halt -i flag may
not properly shut down a network interface if it has no
valid IP address.
2018-10-22 22:19:49 -03:00
Jesse Smith
ed85143837 Removed super loud PC speaker beep during shutdown.
Closes Debian bug #614893. Patch from Andreas Fackler.
2018-10-22 22:03:09 -03:00
Jesse Smith
d27e34754a Unified shutdown and init to use 3 second wait between SIGTERM and
SIGKILL. Defined this value in init.h (WAIT_BETWEEN_SIGNALS) for
easy modification.
Updated documentation to address Debian bug #375274.
2018-10-22 21:44:39 -03:00
Jesse Smith
7b1d470949 Added check for kernel parameter init.autocon=1. If this exists, then
init will try to open its own console. If not, then any console=
parameters will be ignored. This avoids conflicts with native kernel
created consoles.
2018-09-29 17:12:12 -03:00
Jesse Smith
c29655a5c8 Updated changelog with information on pidof's new -q flag.
Fixed Makefile to make sure it does proper clean before making
tarball. And properly creates signed tarball afterwards.
2018-09-08 23:29:02 -03:00
Jesse Smith
f1ca96e1c1 Added patch from Walter Harms which allows pidof to run without
displaying output. In this mode pidof simply returns true or false
without displaying PID values.

Updated manual page with new -q (quiet) mode.

Added -h flag for pidof, which was recognized before, but not used.
The -h flag now displays brief usage information for pidof.
2018-09-08 17:19:21 -03:00
Jesse Smith
eda1f0d6ba Fixed typo in Makefile 2018-09-07 21:46:12 -03:00
Jesse Smith
96b7285309 Fixed Makefile so it cleans up object files before creating tarball. 2018-09-07 21:42:47 -03:00
Jesse Smith
6e8323e9fb The init process now writes the current runlevel to /var/run/runlevel.
This information can be read by the "runlevel" command as well as "halt"
and "reboot". Having the information logged in /var/run/runlevel as
well as the utmp file means systems without utmp (like those running
the musl C library) can still check the current runlevel. This is
useful when running halt/reboot as these programs want to check the
runlevel.

Updated the changelog, and manual pages for halt and runlevel.
2018-07-07 20:19:03 -03:00
Jesse Smith
6b26692584 Added new runlevel log code which saves (and reads) the current runlevel
from /var/run/runlevel. Added test code to runlevel.c to confirm it works.

Will use this to save/restore runlevel on systems where utmp is not
available.
2018-07-07 18:49:04 -03:00
Jesse Smith
aa80ddcc4b Updated init manual page to make "--version" flag behaviour more clear. 2018-07-01 18:51:31 -03:00
Jesse Smith
7656f9d5f9 Version information is now fetched and defined by the Makefile.
No more need to update the version manually in the init.c source.
2018-07-01 18:44:57 -03:00
Jesse Smith
8cc9f34ca4 Merge branch '2.91' of git.sv.gnu.org:/srv/git/sysvinit into 2.91 2018-06-22 17:05:35 -03:00
Jesse Smith
4438de4e50 Added --version flag to init and updated manual page. 2018-06-22 17:04:47 -03:00
Jesse Smith
2a61e2b029 Adjusted order of compile flags to make it possible to select optimization
level by setting CFLAGS at compile file.
2018-06-21 20:22:44 -03:00
Jesse Smith
5f6d86d216 Adjusted order of compile flags to make it possible to select optimization
level by setting CFLAGS at compile file.
2018-06-21 19:34:25 -03:00
Jesse Smith
3a6ebb3c07 Fixed tar flag and typo in Makefile to make sure archive is
properly compressed.
2018-06-18 20:26:58 -03:00
Jesse Smith
40f40a4166 Removed DATE define from init.c, not needed anymore.
Updated Changelog in prep for release.
2018-06-18 19:35:53 -03:00
Jesse Smith
c229965b62 Fixed typo. Corrected by Radostin Stoyanov. 2018-06-11 13:06:04 -03:00
Jesse Smith
2d6d2bc0d3 Updated toplevel Makefile to avoid created unnecessary temporary
directories when they are not wanted/required.
2018-06-03 20:14:01 -03:00
Jesse Smith
108b31e284 Switched from using -fstack-protector to -fstack-protector-strong compile
flag. Tested with both GCC and Clang.
2018-06-02 16:50:35 -03:00
Jesse Smith
56e1041034 Updated Makefile and version information. 2018-05-20 17:21:18 -03:00
Jesse Smith
4732d28994 Reverted changes to Makefile which caused tarball to be
created with incorrect name and parent folder version.
2018-05-20 17:10:54 -03:00
Jesse Smith
75d85cc876 Fixed typo in Changelog. 2018-05-20 16:19:26 -03:00
Jesse Smith
bed25016b1 Updated sulogin.c to pull in crypt.h as it is a new, undocumented
dependency on Fedora 28.
Confirmed we can still build on other/older platforms.
2018-05-09 17:55:35 -03:00
Jesse Smith
3f400a01a3 Updated install documentation, fixed typo. 2018-05-05 17:11:29 -03:00
Jesse Smith
dbf996d888 Fixed some problems in the Makefile which caused it to grab wrong version/user
information for upload.
2018-05-05 14:51:22 -03:00
Jesse Smith
670d691e1a Updated Makefile to use git to find version. Remove unnecessary
username information checking.
2018-05-05 14:33:54 -03:00
Jesse Smith
828c2704a1 Removed old LSM file.
Added .gitignore files to avoid git tracking object files.
Removed old start-stop-daemon from contrib directory.
2018-05-04 22:08:38 -03:00
Jesse Smith
e0cfd39728 Added "Fall through" comments to some switch statements where multiple
approaches are tried in order to prevent warnings from GCC 7 (and newer).

Added includes on Linux for sys/sysmacros.h as the old defines in
the sys/types.h file will be removed in the future.
2018-05-04 14:51:40 -03:00
Jesse Smith
cfb39b573f Updated init.c to remove some old notes and answer questions
that were flagged in comments or FIXME labels.
2018-04-23 00:09:49 -03:00
Jesse Smith
272f112c98 Added new signal handler for SIGUSR2. When init receives SIGUSR2
it closes (and leaves closed) the named pipe /run/initctl. This
can be used to make sure init does not have any files open. However,
it also means we cannot switch run levels or bring down the system.
The pipe can be re-opened by sending init the SIGUSR1 signal.

Updated the man pages for initctl and init to include this information.
2018-04-17 19:44:50 -03:00
Jesse Smith
f09da9cb55 Add check to make sure /run/initctl is open before we try to close
it when receiving SIGUSR1. Avoids crashing upon receiving signal.
2018-04-15 14:09:33 -03:00
Jesse Smith
aee28b3292 Updated init page to reference the initctl manual page instead of
telling people to read the source code to learn how to use
the /run/initctl named pipe. Updated Makefile to install
the initctl.5 manual page.
2018-04-14 19:19:18 -03:00
Jesse Smith
01ca5252e8 Added new manual page for the initctl named pipe.
This provides information on how to send messages
to the init command.
2018-04-14 19:16:12 -03:00
Jesse Smith
266671c968 Added documentation page for initctl (/run/initctl). 2018-04-08 22:03:07 -03:00
Jesse Smith
a4508479f5 Updated shutdown to check if time has lapsed when we did not
notice. For example if the computer was in sleep mode pending
a shutdown. The shutdown command now notices time has past
and adjusts its countdown clock to compensate. Accurate
to the nearest minute.
Closes Savannah bug #36279
2018-04-04 23:12:25 -03:00
Jesse Smith
d9b6475d85 Removed unneeded "count" variable in utmpdump.c.
Fixed typo in accidental wrote_wtmp_rlevel == 0 || wrote_wtmp_rlevel
comparison so the latter is wrote_utmp_rlevel.

Simplified logic in mountpoint.c when testing for same device or same inode.

Thanks to David Binderman for pointing out the above three issues.
2018-03-30 22:15:04 -03:00