Commit Graph

50 Commits

Author SHA1 Message Date
Jesse
ae0488fa66 Fixed merge error. 2022-12-16 12:51:41 -04:00
Jesse
e33a890ea5 Merge branch '3.06' 2022-12-16 12:49:07 -04:00
Jesse
a7fc99b1cf Use relative path when linking pidof to killall5. 2022-12-01 22:55:13 -04:00
Jesse
ce407896b5 Removed redundant translation files from man directory.
Makefile now respects DESTDIR. User can specify either ROOT= or DESTDIR=
to set install prefix.
2022-12-01 15:28:14 -04:00
Jesse
40b66845b7 Makefile now respects ROOT prefix when setting up pidof-to-killall5
symbolic link.
2022-11-30 23:17:18 -04:00
Jesse
356ad32394 Updated Makefile to remove sulogin from Debian builds.
This program is now provided by another package and
dropping sulogin allows SysVinit to no longer rely on
libcrypt-dev.
2022-11-22 10:24:26 -04:00
Qing He
d4f2faf68c src/Makefile: make install locations configurable
This allows following the distribution policies for where these
things should be placed. Defaults stay as they were.
2022-08-30 09:24:31 +02:00
Jesse
e372442256 Fix typo in man/po/es.po
Clean up src/Makefile translation code.
2022-08-23 15:08:13 -03:00
Adam Sampson
e7622b031d Use the .po files to work out which manpage dirs to create.
The pattern being used here didn't match anything in a tarball release.
2022-08-21 22:13:09 +01:00
Jesse
08810d78ff Applied patches from Mark Hindley to clean up man page
Makefile, translations and installs of new man pages.
2022-05-09 12:48:54 -03:00
Jesse Smith
d4cc79bcb9 Added patch from Didier Gaudin which allows init to load configuration
data from files stored in /etc/inittab.d/
2020-01-08 19:42:43 -04:00
Jesse Smith
ad50c8272e Make sure git ignores new executable files in src directory.
Make location of libcrypt library more flexible.
2019-09-12 17:35:55 -03:00
Jesse Smith
13cb3665b1 Make sure src/Makefile cleans up all executable files when
parent makefile calles "make clean".
2019-09-11 14:42:20 -03:00
Jesse Smith
5f96543c96 Updated changelog for release. 2019-06-15 14:01:01 -03:00
Jesse Smith
3f2b4a5704 Added logsave.c and logsave.8 manual page from e2fsprogs to make
sure logsave is available to initscripts.

Updated src/Makefile to make sure bootlogd compiles with Clang.
2018-12-31 16:31:34 -04:00
Jesse Smith
9e8553cacb Updated copyright in init and removed unused Version variable from killall5.c 2018-12-27 15:31:14 -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
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
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
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
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
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
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
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
6a8a216449 Fix typo in killall5.c and move initscript.sample file
from source tree into "doc" directory.
2018-02-20 19:36:21 -04:00
Jesse Smith
80dbcf3de3 Moved the named communication pipe from /dev/initctl to /run/initctl. This
patch was supplied by Robert Millan from Debian. FreeBSD apparently does not
like named piped in /dev, so we move it to /run for better cross-platform
compatibility.
2018-02-20 19:29:08 -04:00
Jesse Smith
efa6fefa8e Applied Debian patches to update init Makefile, halt and init documentation. 2018-02-20 19:26:09 -04:00
Petter Reinholdtsen
d972463609 Include -Wunreachable-code when building. 2014-02-28 13:18:49 +00:00
Petter Reinholdtsen
6ba8311144 Get more help from gcc, add -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 and -fstack-protector. 2014-02-07 08:00:58 +00:00
Petter Reinholdtsen
8478327498 Adjust makefile to make it easier to link all binaries statically.
Patch from Matias A. Fonzo and Dragora.
2014-01-28 22:11:34 +00:00
Petter Reinholdtsen
c26aaa4410 Define _XOPEN_SOURCE when building to get crypt() from <unistd.h> instead of using <crypt.h> in sulogin.c, to get the source building with the musl C library. 2014-01-27 22:05:54 +00:00
Petter Reinholdtsen
d2f82534cf Try harder to find libcrypt.*, even if there is no static library
available.  Also look in /usr/lib/*/ for the library, to handle
Debian multiarch systems.  Based on patch from Andrew Gregory.
2014-01-25 21:57:25 +00:00
Werner Fink
3cb95c8371 Handle if the mountpoint(1) command is from util-linux 2.20+ 2011-07-01 13:56:45 +00:00
Werner Fink
bfca7da0f5 * Remove man-db tag for encoding for canonical man 2011-04-27 13:41:04 +00:00
Werner Fink
4301a57e89 Sulogin: try to detect the real device(s) used for the system console
/dev/console if but only if /dev/console is used.  On Linux this can
be more than one device, e.g. a serial line as well as a virtual
console as well as a simple printer.
2011-04-04 13:57:54 +00:00
Werner Fink
1ef9e7736c * Add code to detect the system consoles with the help of the
new /proc/consoles files of linux kernel 2.6.38+
2011-03-11 17:29:36 +00:00
Werner Fink
ba54bb9ac4 Fix sysvinit bug #29758 2010-05-04 07:50:12 +00:00
Petter Reinholdtsen
d32b28e44e Do not strip binaries before installing them, to make it easier to get binaries with debug information installed. 2010-04-11 08:50:10 +00:00
Werner Fink
5e919cc4ca * ditto 2010-04-01 09:06:35 +00:00
Werner Fink
c49baa492c * ditto 2010-03-30 17:39:19 +00:00
Werner Fink
b2fec03199 * Test out PAM support, extend PAM support by providing environment
is specified by /etc/pam.d/init
 * Move utmp/wtmp before the execvp() in spawn() to be sure to
   use the correct pid even on a controlling tty
 * Remaining problem is that the pid of the second fork() for
   getting a controlling tty isn't that reported by spawn()
 * Re-enable writting utmp/wtmp for boot scripts
 * Provide a simply /etc/pam.d/init as without it will not work (sigh!)
2010-03-26 16:31:05 +00:00
Werner Fink
f69ea1f550 * Add fix for Debian bug #536574 -- Can be enabled by -DACCTON_OFF
* Add helper program fstab-decode to make it easier to handle
   /etc/mtab content. Patch by Miloslav Trmac and Fedora.
 * Add fix for Debian bug #335023 - Make sure TERM is set on FreeBSD.
 * Add fix for Debian bug #374038 - Make it clear that shutdown -c can
   only cancel a waiting shutdown, not an active one.
 * Add not to pidof manual page about the use of readlink(2). Patch by
   Bill Nottingham and Fedora.
 * Add changes for Debian bug #68621 - Add PAM support for programs spawned
   by init on the console like sulogin. Based on patch by Topi Miettinen.
2010-03-23 14:37:01 +00:00
Werner Fink
1874af5c9c * Add option -w to the last command to display the full user and
domain names in the output.  Patch from Petr Lautrbach.
  * Add a manual page for utmpdump as this tool is sometimes
    very useful even if not intended for normal use.
  * Use paths.h macros for wall
  * Change path "/etc/powerstatus" to "/var/run/powerstatus"
2010-02-19 15:51:36 +00:00
Werner Fink
13de2e9e05 Add the comment from Andrea Arcangeli about the correct
place of setting the default childhandler within spawn().
Make sure that newline is printed out for last(1) even
if an utmp record entry is truncated.
Check if utmp not only exists but is writable and delay
writing out of the utmp runlevel record if utmp is not writable.
Be able to find libcrypt also on 64 bit based architectures.
2009-11-24 10:03:19 +00:00
Petter Reinholdtsen
b80d3844c1 Simplify build rules, based on patch from Mike Frysinger and Gentoo. 2009-11-20 22:55:47 +00:00
Petter Reinholdtsen
483db5bc72 Adjust makefile to make sure the install directories are created before files are copied into them. 2009-11-14 21:09:19 +00:00
Petter Reinholdtsen
2fe47a3c9f Drop hurd specific dependency on libc0.3 (>= 2.3.2.ds1-12). It is
no longer needed according to Michael Bunk.  Patch from Michael
Biebl.
2009-09-10 08:28:49 +00:00