<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/sbin/init/init.c, branch upstream/10.1.0</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=upstream%2F10.1.0</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=upstream%2F10.1.0'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2013-08-13T18:51:26Z</updated>
<entry>
<title>init: Set kernel login class and CPU mask on new processes.</title>
<updated>2013-08-13T18:51:26Z</updated>
<author>
<name>Jilles Tjoelker</name>
<email>jilles@FreeBSD.org</email>
</author>
<published>2013-08-13T18:51:26Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=595ab5638b1c5db0973608d8c8eda712ed0802ca'/>
<id>urn:sha1:595ab5638b1c5db0973608d8c8eda712ed0802ca</id>
<content type='text'>
In particular, this makes the kernel login class on processes started from
/etc/rc "daemon" instead of "default".

Reviewed by:	trasz
</content>
</entry>
<entry>
<title>init: Remove unnecessary 2-second delay before calling reboot(2).</title>
<updated>2012-05-25T19:45:01Z</updated>
<author>
<name>Jilles Tjoelker</name>
<email>jilles@FreeBSD.org</email>
</author>
<published>2012-05-25T19:45:01Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=3c52150e70ebc3e264786918f0414edfa243a7d2'/>
<id>urn:sha1:3c52150e70ebc3e264786918f0414edfa243a7d2</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Properly clear the O_NONBLOCK flag after opening the TTY.</title>
<updated>2012-04-06T13:06:01Z</updated>
<author>
<name>Ed Schouten</name>
<email>ed@FreeBSD.org</email>
</author>
<published>2012-04-06T13:06:01Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=6ee5808be791510ee549529218ebd9e61853a5ef'/>
<id>urn:sha1:6ee5808be791510ee549529218ebd9e61853a5ef</id>
<content type='text'>
Though we should open the TTY with O_NONBLOCK to prevent rc(8) execution
from potentially stalling, we must not forget to clear the flag later
on, to prevent read(2) calls from failing later on.

This prevented the shell pathname prompt from working properly.

Reported by:	kib
</content>
</entry>
<entry>
<title>Make init(8) slightly more robust when /dev/console is missing.</title>
<updated>2012-03-14T16:22:09Z</updated>
<author>
<name>Ed Schouten</name>
<email>ed@FreeBSD.org</email>
</author>
<published>2012-03-14T16:22:09Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=4c2c7b2c9461801cdc2b12fb342d39207e92c445'/>
<id>urn:sha1:4c2c7b2c9461801cdc2b12fb342d39207e92c445</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>Fix whitespace.</title>
<updated>2012-03-11T22:30:06Z</updated>
<author>
<name>Ed Schouten</name>
<email>ed@FreeBSD.org</email>
</author>
<published>2012-03-11T22:30:06Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=7a11d7d883255a4396392a33a04672610ac7c02e'/>
<id>urn:sha1:7a11d7d883255a4396392a33a04672610ac7c02e</id>
<content type='text'>
MFC after:	1 week
</content>
</entry>
<entry>
<title>Handle NULL return from crypt(3). Mostly from DragonFly</title>
<updated>2012-02-22T06:27:20Z</updated>
<author>
<name>Kevin Lo</name>
<email>kevlo@FreeBSD.org</email>
</author>
<published>2012-02-22T06:27:20Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=29dcf726d233505532b89c31f8ba31eb69fa26df'/>
<id>urn:sha1:29dcf726d233505532b89c31f8ba31eb69fa26df</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Move utmpx handling out of init(8).</title>
<updated>2012-02-11T20:47:16Z</updated>
<author>
<name>Ed Schouten</name>
<email>ed@FreeBSD.org</email>
</author>
<published>2012-02-11T20:47:16Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=c21ae3a403b8fbf817d4e11ccaf4a67ad8495450'/>
<id>urn:sha1:c21ae3a403b8fbf817d4e11ccaf4a67ad8495450</id>
<content type='text'>
This has the following advantages:

- During boot, the BOOT_TIME record is now written right after the file
  systems become writable, but before users are allowed to log in. This
  means that they can't cause `hidden logins' by logging in right before
  init(8) kicks in.

- The pututxline(3) function may potentially block on file locking,
  though this is very rare to occur. By placing it in an rc script, the
  user can still kill it with ^C if needed.

- Most importantly: jails don't use init(8). This means that a force
  reboot of a system running jails will leave stale entries in the
  accounting database of the jails individually.
</content>
</entry>
<entry>
<title>Add missing static keywords for global variables to tools in sbin/.</title>
<updated>2011-11-04T13:36:02Z</updated>
<author>
<name>Ed Schouten</name>
<email>ed@FreeBSD.org</email>
</author>
<published>2011-11-04T13:36:02Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=1efe3c6b58ea5d0e5a0d49039d84d00f2370c7de'/>
<id>urn:sha1:1efe3c6b58ea5d0e5a0d49039d84d00f2370c7de</id>
<content type='text'>
These tools declare global variables without using the static keyword,
even though their use is limited to a single C-file, or without placing
an extern declaration of them in the proper header file.
</content>
</entry>
<entry>
<title>init: Only run /etc/rc.shutdown if /etc/rc was run.</title>
<updated>2011-01-23T14:22:26Z</updated>
<author>
<name>Jilles Tjoelker</name>
<email>jilles@FreeBSD.org</email>
</author>
<published>2011-01-23T14:22:26Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=acf0ab0669861bdcef9c49f5ed87ff6c82bd1d1b'/>
<id>urn:sha1:acf0ab0669861bdcef9c49f5ed87ff6c82bd1d1b</id>
<content type='text'>
It does not make sense to shut down daemons that were not started. In
particular, this fixes loss of mixer settings when shutting down using
shutdown(8), init(8) or ctrl+alt+del from single-user mode.

If /etc/rc reboots, /etc/rc.shutdown is not run.

Also fix segfaults and other erratic behaviour if init receives SIGHUP or
SIGTSTP while in single-user mode.

This commit does not attempt to fix any badness with signal handlers
(assumption that pointers can be read and written atomically, EINTR race
condition). I believe it does not make this badness any worse.

Silence on:	-arch@
</content>
</entry>
<entry>
<title>Remove stale inclusion of &lt;ulog.h&gt;.</title>
<updated>2010-01-27T20:32:58Z</updated>
<author>
<name>Ed Schouten</name>
<email>ed@FreeBSD.org</email>
</author>
<published>2010-01-27T20:32:58Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=a21dd5e9dd63fb9fd47254a7622271caa2acaee4'/>
<id>urn:sha1:a21dd5e9dd63fb9fd47254a7622271caa2acaee4</id>
<content type='text'>
This tool doesn't require libulog anymore.
</content>
</entry>
</feed>
