des
a93e80dada
Allow reboot during runcom.
...
PR: bin/28116
Submitted by: Valentin Nechayev <netch@netch.kiev.ua>
MFC in: 1 week
2001-10-15 20:34:43 +00:00
kris
5e75b336b9
Silence non-constant format string warnings by marking functions
...
as __printflike()/__printf0like(), adding const, or adding missing "%s"
format strings, as appropriate.
MFC after: 2 weeks
2001-08-19 08:19:37 +00:00
sheldonh
9bfb9eedcd
Use STD{ERR,IN,OUT}_FILENO instead of their numeric values. The
...
definitions are more readable, and it's possible that they're
more portable to pathalogical platforms.
Submitted by: David Hill <david@phobia.ms>
2001-07-26 11:02:39 +00:00
mikeh
d795e6a826
Fix typo which could lead to memory leak.
...
PR: misc/28283
MFC after: 2 weeks
2001-06-20 01:56:09 +00:00
asmodai
5f89669270
Fix typo present since 1997: single used mode -> single user mode.
2001-03-03 08:12:58 +00:00
phk
f8ce1eae95
Fix a cosmetic problem with some very defensive programming: The devfs
...
mount would show up as "/dev/", loose that trailing slash.
2001-02-08 22:07:08 +00:00
obrien
c2ee1dcc02
Add `_PATH_DEVZERO'.
...
Use _PATH_* where where possible.
2000-12-09 09:35:55 +00:00
phk
fd7a4d0371
Mount DEVFS with no options.
2000-08-26 11:53:53 +00:00
asmodai
3022b1ea3d
Remove unused include.
2000-05-01 20:20:05 +00:00
imp
7fec3d2787
Add include of errno.h where needed, remove extern int errno where not.
...
These commits were inspired by a similar commit to netbsd.
2000-04-14 06:15:01 +00:00
alfred
a34d288bc9
detect deleted tty lines in /etc/ttys.
2000-02-19 20:28:45 +00:00
dillon
e8e6885c6b
Finish up umntall support. init now passed an argument to the
...
rundown script 'reboot' or 'single'. ISO support (which never
worked) has been removed from mount_nfs. mount_nfs and umount
now use mounttab, which allows umntall to work properly. The
rc scripts now call umntall as appropriate.
Submitted by: Martin Blapp <mb@imp.ch>
1999-11-22 04:23:11 +00:00
kato
6ed01edd23
FreeBSD kernel doesn't allow any process to decrease securelevel. So,
...
init(8) cannot decrease securelevel. The manual page explains this
and single_user() doesn't try to downgrade kernel to insecure mode.
Reviewed by: bde (manual page)
1999-09-06 08:41:32 +00:00
peter
76f0c923fe
$Id$ -> $FreeBSD$
1999-08-28 00:22:10 +00:00
ru
78cfb5805b
Fix a non-critical memory leak.
...
PR: 12769
Submitted by: Peter Jeremy <peter.jeremy@alcatel.com.au>
1999-07-23 08:28:46 +00:00
ru
412b642b28
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
ru
f97d9ce3bb
Init(8) will halt the system if sent USR1 signal,
...
or halt and turn the power off if sent SIGUSR2.
PR: 5451
Submitted by: Leif Neland <leifn@image.dk>
Reworked by: ru
Reviewed by: -hackers
1999-06-16 20:01:19 +00:00
phk
7ebd4f74fb
Memory management error in init.
...
PR: 7320
Reviewed by: phk
Submitted by: Anders Thulin <Anders.X.Thulin@telia.se>
1998-07-22 05:45:11 +00:00
charnier
fff847fc47
Correct .Nm use. Add rcsid. Use min for minutes instead of mn.
1998-07-06 06:56:08 +00:00
jraynard
149cf90af1
Don't assume sigset_t and int are equivalent.
1998-03-02 23:19:29 +00:00
peter
0e8d0ba0f2
This has always bugged me. At single user, the implied example it gives
...
is not valid - it says that "sh" is the default, but you can't
actually type "sh" at this prompt - it has to be /bin/sh or some other
full pathname.
1997-10-10 12:14:48 +00:00
davidn
228bbc181c
Test that rc.shutdown exists before attempting to run it - silently
...
return success if it doesn't to prevent any unwanted error msgs.
1997-08-18 01:40:12 +00:00
ache
9f4c4482b5
runshutdown(): get rid of getdtablesize loop, it gains nothing now
...
but can waste time if many descriptors are available
1997-08-06 16:34:51 +00:00
ache
a867dc6278
rc.shutdown fixes:
...
1) revoke -> HUP
2) controlling terminal already present
3) add missing setprocresources call
1997-08-06 16:07:52 +00:00
davidn
c0b9ea4c76
Add /etc/rc.shutdown capability to init.
...
Add sample /etc/rc.shutdown (which is just a shell for now).
Submitted by: Ollivier Robert <roberto@keltia.freenix.fr>
1997-08-02 00:22:52 +00:00
ache
043d604a07
Move logwtmp(shutdown) call before any real action in death().
1997-07-08 11:51:11 +00:00
ache
baa3a4dbcc
1. Replace malloc+bzero by calloc
...
2. Revoke internal active session list only now, not whole /etc/ttys
1997-07-05 19:36:55 +00:00
ache
d4280e0ef8
death: revoke all lines listed in /etc/ttys instead of sending HUP
...
to all processes
1997-07-04 22:09:07 +00:00
ache
b44556e359
Include <libutil.h> instead of private declarations
1997-07-03 11:37:43 +00:00
ache
49221f7583
Remove unneded cast in login_getclassbyname which cause warning
1997-07-02 13:53:31 +00:00
pst
489b7a4fe8
Attempt to open the device for reading before actually adding the device
...
to the session list. If the device comes back as unconfigured, just
ignore that line in /etc/ttys. If someone HUP's init, we'll try again.
This change stops getty's from hanging on vty and sio ports that don't
exist, either due to LKM drivers not being loaded, or probes failing.
Reviewed by: bde
1997-06-28 08:18:29 +00:00
charnier
98daca0d1c
Use err(3).
1997-06-13 06:24:42 +00:00
phk
85568f7654
Fix mount call for devfs.
...
Submitted by: bde
1997-03-30 09:22:41 +00:00
dg
d71873490f
Protect from stack overrun via /etc/ttys, which could possibly allow a
...
root user to change the securelevel. Pointed out by Thomas H. Ptacek
<tqbf@enteract.com>.
1997-02-19 08:04:58 +00:00
davidn
71e4601fc6
Style police.
1997-01-22 02:07:55 +00:00
davidn
557de278bc
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
phk
91bd35f309
If passed the -d flag, mount devfs on /dev
1996-10-28 11:03:19 +00:00
dima
b6116933b0
If root does not have a password, `init' should not ask to enter it.
...
otherwise it's not possible to get into single-user mode, if root
does not have password and console insecure.
1995-11-10 07:06:59 +00:00
phk
f161a927d6
Define TRUE & FALSE rather than depending on bogus #includes.
1995-10-29 09:44:09 +00:00
mpp
803ee03130
Fix init to correctly detect processes that are exiting multiple
...
times per second.
1995-08-08 06:49:59 +00:00
ache
224e922aeb
nspace count was incremented only in child, so warning never displayed
...
Pointed by: Mike Pritchard <mpp@mpp.minn.net>
1995-08-08 02:29:12 +00:00
rgrimes
f3a2b348da
Remove trailing whitespace.
1995-05-30 06:12:45 +00:00
ache
6cbf9ac3bb
Add better argument handling
...
Submitted by: jmz
1995-01-10 21:19:57 +00:00
ache
9cd061f6c1
revision 1.6
...
date: 1994/03/06 08:55:02; author: ache; state: Exp; lines: +4 -1
Stop count getty spacing problem, if we issue kill -1 1
----------------------------
revision 1.5
date: 1994/03/04 17:51:39; author: ache; state: Exp; lines: +9 -2
I got a lot of
"getty repeating too quickly on port %s, sleeping"
from init.bsdi, it means that getty start and exit in five seconds.
This is common situation for poor quality Russian phone lines:
modem got CONNECT message and after retries got NO CARRIER.
So I introduce spacing count, it means that this warning and
sleep occurse only after GETTY_NSPACE times of sequental attempts.
----------------------------
revision 1.4
date: 1994/02/28 21:53:52; author: ache; state: Exp; lines: +71 -10
I found (and fix) ugly bugs in init.bsdi (this bugs not present
in old init)
1) Init don't setup TERM environment variable for default terminal
type from /etc/ttys before calling getty/window.
2) When "kill -1 1" issued, init don't restart getty when
/etc/ttys parameters was changed (it only kill "off" end empty entries).
3) Small memory leak if "window" /etc/ttys parameter specified and
"kill -1 1" issued.
Obtained from: FreeBSD 1.x
1994-10-14 17:15:40 +00:00
jkh
4209b935fe
What cretin named both a global and a function "reboot"? Global
...
changed to Reboot.
Submitted by: jkh
1994-08-28 10:00:49 +00:00
nate
398581a79d
Bring in my changes from the 1.1 init.bsdi which causes a reboot (was a
...
halt before) if init is sent an interrupt signal. This is necessary
for <CTL><ALT><DEL> to do the right thing if enabled.
1994-08-27 21:32:01 +00:00
dg
5d3f6f3b9b
Nuked the 2 second DTR wait; this is handled correctly in the sio driver.
1994-08-23 04:42:45 +00:00
rgrimes
d038e02fd6
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