1204585265
If the environment doesn't offer a working /dev/console, the existing version of init(8) will simply refuse running rc(8) scripts. This means you'll only have a system running init(8) and nothing else. Change the code to do the following: - Open /dev/console like we used to do, but make it more robust to use O_NONBLOCK to prevent blocking on a carrier. - If this fails, use /dev/null as stdin and /var/log/init.log as stdout and stderr. - If even this fails, use /dev/null as stdin, stdout and stderr. So why us this useful? Well, if you remove the `getpid() == 1' check in main(), you can now use init(8) inside jails to properly execute rc(8). It still requires some polishing, as existing tools assume init(8) has PID 1. Also it is now possible to use use init(8) on `headless' devices that don't even have a serial boot console.
40 lines
1.8 KiB
Plaintext
40 lines
1.8 KiB
Plaintext
# configuration file for newsyslog
|
|
# $FreeBSD$
|
|
#
|
|
# Entries which do not specify the '/pid_file' field will cause the
|
|
# syslogd process to be signalled when that log file is rotated. This
|
|
# action is only appropriate for log files which are written to by the
|
|
# syslogd process (ie, files listed in /etc/syslog.conf). If there
|
|
# is no process which needs to be signalled when a given log file is
|
|
# rotated, then the entry for that file should include the 'N' flag.
|
|
#
|
|
# The 'flags' field is one or more of the letters: BCDGJNUXZ or a '-'.
|
|
#
|
|
# Note: some sites will want to select more restrictive protections than the
|
|
# defaults. In particular, it may be desirable to switch many of the 644
|
|
# entries to 640 or 600. For example, some sites will consider the
|
|
# contents of maillog, messages, and lpd-errs to be confidential. In the
|
|
# future, these defaults may change to more conservative ones.
|
|
#
|
|
# logfilename [owner:group] mode count size when flags [/pid_file] [sig_num]
|
|
/var/log/all.log 600 7 * @T00 J
|
|
/var/log/amd.log 644 7 100 * J
|
|
/var/log/auth.log 600 7 100 * JC
|
|
/var/log/console.log 600 5 100 * J
|
|
/var/log/cron 600 3 100 * JC
|
|
/var/log/daily.log 640 7 * @T00 JN
|
|
/var/log/debug.log 600 7 100 * JC
|
|
/var/log/init.log 644 3 100 * J
|
|
/var/log/kerberos.log 600 7 100 * J
|
|
/var/log/lpd-errs 644 7 100 * JC
|
|
/var/log/maillog 640 7 * @T00 JC
|
|
/var/log/messages 644 5 100 * JC
|
|
/var/log/monthly.log 640 12 * $M1D0 JN
|
|
/var/log/pflog 600 3 100 * JB /var/run/pflogd.pid
|
|
/var/log/ppp.log root:network 640 3 100 * JC
|
|
/var/log/security 600 10 100 * JC
|
|
/var/log/sendmail.st 640 10 * 168 B
|
|
/var/log/utx.log 644 3 * @01T05 B
|
|
/var/log/weekly.log 640 5 1 $W6D0 JN
|
|
/var/log/xferlog 600 7 100 * JC
|