Commit Graph

40 Commits

Author SHA1 Message Date
Glen Barber
406d87b1c3 Explicitly add more files to the 'runtime' package.
Sponsored by:	The FreeBSD Foundation
2016-02-09 20:19:31 +00:00
Edward Tomasz Napierala
3f5ac575ea Userspace part of reroot support. This makes it possible to change
the root filesystem without full reboot, using "reboot -r". This can
be used to to eg. boot from a temporary md_image preloaded by loader(8),
setup an iSCSI session, and continue booting from rootfs mounted over
iSCSI.

Reviewed by:	kib@, bapt@
MFC after:	1 month
Relnotes:	yes
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D3693
2015-11-08 17:33:48 +00:00
Baptiste Daroussin
13eb765f2d Convert sbin/ to LIBADD
Reduce overlinking
2014-11-25 11:23:12 +00:00
Ed Schouten
bb6c761206 Migrate init(8) towards utmpx.
According to a comment, we cannot safely remove utmpx entries here
anymore. This is because the libc routines may block on file locking. In
an ideal world login(1) should just remove the entries, which is why I'm
disabling this code for now. If it turns out we get lots of stale
entries here, we should figure out a way to deal with that.
2010-01-13 17:58:49 +00:00
Ed Schouten
14c69f2136 Let init(8) and reboot(8) use utmpx to log wtmp entries.
logwtmp() gets called with the raw strings that are written to disk. For
regular user entries, this isn't too bad, but when booting/shutting
down, the contents get rather cryptic.

Just call the standardized pututxline().
2009-12-05 20:26:55 +00:00
Ruslan Ermilov
106d839190 Switch the default WARNS level for sbin/ to 6.
Submitted by:	Ulrich Spörlein
2009-10-19 16:00:24 +00:00
Remko Lodder
fcd7ed0e3a I understood the MLINK part incorrectly, it should be the other way around
also remove the init mlink to securelevel.

Discussed with and sharing pointyhat with:	brueffer
2007-06-01 21:48:07 +00:00
Luigi Rizzo
cea897b2bf use standard mode instead of 500 for /sbin/init.
As discussed on -current, there is no sensitive info in /sbin/init
to prevent reading it from non-privileged users, nor any reason to
remove the 'x' bit as the first thing the program does is check the
uid and exit if it is not run by root.

Instead (and this is why i make the change), mode 500 prevents
operation when exporting the partition without -maproot=0 to diskless
clients.

All previuos releases are affected by the same problem, so a merge
to RELENG_6 at least would be appropriate (after proper re@ approval
of course).
2006-02-28 08:02:28 +00:00
Xin LI
ab03e6d597 Make WARNS=6 happy with our init(8):
- Use more ``const''s where suitable.
	- Define strk() as a static function in global scope.
	  This avoids the "nested extern declaration" warnings.
	- Use static initialization of strings, rather than
	  referring string constants through char *.
	- Bump WARNS from 0 to 6.
2005-01-11 14:34:29 +00:00
Ruslan Ermilov
83c7ade90a NOSHARED -> NO_SHARED 2004-12-21 09:59:45 +00:00
Ruslan Ermilov
dee651eb15 Introduce the PRECIOUSPROG knob in bsd.prog.mk, similar
to PRECIOUSLIB from bsd.lib.mk.  The side effect of this
is making installing the world under jail(8) possible by
using another knob, NOFSCHG.

Reviewed by:	oliver
2004-11-03 18:01:21 +00:00
Johan Karlsson
604d24db95 style.Makefile(5):
Use WARNS?= instead of WARNS=.
2004-02-23 20:25:27 +00:00
Gordon Tetlow
dc59303d62 Make init statically linked by default. It's not worth the pain of having
a dynamically linked init as recently seen by ia64 woes.

Approved by:	re (jhb)
2003-11-19 19:57:20 +00:00
David E. O'Brien
2d68bf45bf Default to WARNS=2.
Binary builds that cannot handle this must explicitly set WARNS=0.

Reviewed by:	mike
2001-12-04 02:19:58 +00:00
Ruslan Ermilov
4cf39050cc Use new backup feature of install(1). 2001-05-28 16:58:35 +00:00
Ruslan Ermilov
0a5779d45b - Backout botched attempt to introduce MANSECT feature.
- MAN[1-9] -> MAN.
2001-03-26 14:33:27 +00:00
Ruslan Ermilov
fe655281c5 Set the default manual section for sbin/ to 8. 2001-03-20 18:13:31 +00:00
Peter Wemm
623d7cd30e Further tidy up the sbin/init and release builds. 2001-01-01 21:39:00 +00:00
Poul-Henning Kamp
8440a01077 This is not necessarily the correct fix, but at least sbin/init compiles
in a sterile environment like "make release"
2001-01-01 19:46:43 +00:00
Alexander Langer
aeca5be56b Add MLINK init.8 --> securelevel.8
Requested by:	Brett Glass <brett@lariat.org>
PR:		13792
Submitted by:	nik
2000-06-09 09:40:34 +00:00
Mark Murray
21fd828d7c Change DISTRIBUTION to match new world order. 2000-02-29 11:40:57 +00:00
Peter Wemm
7f3dea244c $Id$ -> $FreeBSD$ 1999-08-28 00:22:10 +00:00
Ruslan Ermilov
ec3e2c5d4f Backup existing init(8) as /sbin/init.bak.
PR:		12976
Submitted by:	Peter Jeremy <peter.jeremy@alcatel.com.au>
1999-08-05 09:13:57 +00:00
Ruslan Ermilov
5d94d8b6a2 Turn System V command line syntax ``on'' by default.
Requested by:		peter
Reviewed by:		des, billf
1999-07-01 13:33:56 +00:00
Ruslan Ermilov
1681d65976 Bring in System V run-level patches (turned off by default).
While I'm here, fix some typos in the manpage.

Requested by:	des
1999-06-18 09:08:09 +00:00
Bruce Evans
87f01287d2 Removed definition of _NEW_VFSCONF. The new vfsconf interface is now
the default.
1998-01-20 10:40:18 +00:00
David Nugent
80f69e57cd ".if exists(${CURDIR}/../../secure)" rather than testing relative to the
object directory.
1997-08-18 03:32:09 +00:00
Andrey A. Chernov
19e00c1345 Add -D_NEW_VFSCONF to eliminate compilation warning 1997-07-05 19:34:51 +00:00
Peter Wemm
c0ec1f37ef Revert $FreeBSD$ to $Id$ 1997-02-22 14:40:44 +00:00
Mark Murray
35c6fcd43b Part two of a "fix-and-move". There were some macros declared in ../sbin's
Makefile that were a) broken and b) bogusly placed. This brings the
repeared macros in.

Pointed-out-by:	BDE
1997-02-10 17:44:34 +00:00
David Nugent
1ef60eb115 Impose login_cap resource limits on processes started by init.
/etc/rc started with "daemon" settings.
	"window=" started with "default" settings
	gettys started with "default" settings.
This should open the way to junk kernel options MAX_{OPEN,CHILD}
and the corresponding sysctl vars.
1997-01-19 16:49:13 +00:00
Jordan K. Hubbard
1130b656e5 Make the long-awaited change from $Id$ to $FreeBSD$
This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore.  This update would have been
insane otherwise.
1997-01-14 07:20:47 +00:00
Bruce Evans
5b963fa12e Fixed DPADD. 1996-09-05 17:16:10 +00:00
Mark Murray
24136561dc Better method of choosing libdescrypt/libscrypt. 1996-05-04 08:16:20 +00:00
Joerg Wunsch
b6729ee0c2 The DES-based init(8) belongs to the "des" distribution. 1996-02-13 09:12:10 +00:00
Bruce Evans
7d2c66ed67 Fix $Id$. 1995-10-03 15:11:11 +00:00
Mark Murray
090bf93cd1 Make this make work the same way as passwd and xntpd. Here it will allow
secure/sbin/init to be cleaned out, and sbin/Makefile to be tidied up.
1995-10-01 15:12:47 +00:00
Garrett Wollman
053b68b9ae `init' needs crypt() for insecure consoles. 1994-08-15 02:45:37 +00:00
Garrett Wollman
404c1a5fc1 Convert to our man installation style. Also fixed long-standing bug
in `fastboot'/`fasthalt' in which the interpreter would hang around
after `reboot' or `halt' is run, causing an irritating ``Killed'' message.
1994-08-05 02:42:42 +00:00
Rodney W. Grimes
8fae3551ec BSD 4.4 Lite sbin Sources
Note:  XNSrouted and routed NOT imported here, they shall be imported with
usr.sbin.
1994-05-26 06:35:07 +00:00