summaryrefslogtreecommitdiffstats
path: root/sbin/init/init.c
Commit message (Collapse)AuthorAgeFilesLines
* Turns out that revision 1.52 was a bad idea. It broke the longimp2004-09-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | standing ability to list a non-existant device in /etc/ttys to keep it from dying. This is a documented feature of init(8): The init utility can also be used to keep arbitrary daemons running, automatically restarting them if they die. In this case, the first field in the ttys(5) file must not reference the path to a configured device node and will be passed to the daemon as the final argument on its com- mand line. This is similar to the facility offered in the AT&T System V UNIX /etc/inittab. So rather than fix the man page to 'break' this feature, back out the change. At the time this change was made, people felt that the spamage from getty was annoying on headless consoles. Andrew Gallatin noted: > Most of my machines are headless without video cards and use a serial > console. With devfs this means that /dev/ttyv[1-N] do not exist and > getty bitches like this: > > Sep 26 11:00:11 monet getty[543]: open /dev/ttyv1: No such file or directory and we went off and applied this hack rather than fixing getty to sleep forever when it gets an unknown device, as was Andrew's other suggestion. Since it breaks things, I'm off to do that instead.
* Remove advertising clause from University of California Regent's license,markm2004-04-091-4/+0
| | | | | | per letter dated July 22, 1999. Approved by: core, imp
* Fixed misspellings of 0 as NULL.bde2004-03-111-2/+2
|
* Fix the case where one goes from zero to more than zero items enabledimp2003-12-051-3/+0
| | | | | | | | | | | in /etc/ttys. Before this fix, once the count of active services reaches 0, one could never restart any more without a reboot. Steve Passe did the leg work on this patch. After he found the fix, we discovered that an identical fix had been made to NetBSD. Approved by: re@ <scottl> Approval tool: peril sensitive sunglasses
* Back out the previous commit, since there could be dire consequences ifgreen2002-12-171-4/+0
| | | | /etc/rc were accidentally executed (as requested by other committeers).
* /home/green/tmp/cvsSFosXggreen2002-12-171-0/+4
|
* Give up on a tty if opening it's special file returns ENOENT like we do forjhb2002-09-271-1/+1
| | | | | | ENXIO. Glanced at by: imp, gallatin
* I should have committed this ages ago...mux2002-08-031-3/+15
| | | | | | Convert init(8) to use nmount() instead of mount() when it has to mount devfs. This doesn't happen normally, since the kernel is supposed to mount devfs itself.
* o remove __Pimp2002-03-201-160/+64
| | | | | o Use ansi function definitions o unifdef -D__STDC__
* Remove 'register' keyword.obrien2002-03-201-18/+18
| | | | | | It does not help modern compilers, and some may take some hit from it. (I also found several functions that listed *every* of its 10 local vars with "register" -- just how many free registers do people think machines have?)
* Allow reboot during runcom.des2001-10-151-0/+3
| | | | | | PR: bin/28116 Submitted by: Valentin Nechayev <netch@netch.kiev.ua> MFC in: 1 week
* Silence non-constant format string warnings by marking functionskris2001-08-191-9/+9
| | | | | | | as __printflike()/__printf0like(), adding const, or adding missing "%s" format strings, as appropriate. MFC after: 2 weeks
* Use STD{ERR,IN,OUT}_FILENO instead of their numeric values. Thesheldonh2001-07-261-1/+1
| | | | | | | definitions are more readable, and it's possible that they're more portable to pathalogical platforms. Submitted by: David Hill <david@phobia.ms>
* Fix typo which could lead to memory leak.mikeh2001-06-201-1/+1
| | | | | PR: misc/28283 MFC after: 2 weeks
* Fix typo present since 1997: single used mode -> single user mode.asmodai2001-03-031-1/+1
|
* Fix a cosmetic problem with some very defensive programming: The devfsphk2001-02-081-1/+17
| | | | mount would show up as "/dev/", loose that trailing slash.
* Add `_PATH_DEVZERO'.obrien2000-12-091-1/+2
| | | | Use _PATH_* where where possible.
* Mount DEVFS with no options.phk2000-08-261-1/+1
|
* Remove unused include.asmodai2000-05-011-1/+0
|
* Add include of errno.h where needed, remove extern int errno where not.imp2000-04-141-2/+0
| | | | These commits were inspired by a similar commit to netbsd.
* detect deleted tty lines in /etc/ttys.alfred2000-02-191-1/+25
|
* Finish up umntall support. init now passed an argument to thedillon1999-11-221-3/+8
| | | | | | | | | 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>
* FreeBSD kernel doesn't allow any process to decrease securelevel. So,kato1999-09-061-6/+0
| | | | | | | 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)
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Fix a non-critical memory leak.ru1999-07-231-4/+6
| | | | | PR: 12769 Submitted by: Peter Jeremy <peter.jeremy@alcatel.com.au>
* Bring in System V run-level patches (turned off by default).ru1999-06-181-4/+37
| | | | | | While I'm here, fix some typos in the manpage. Requested by: des
* Init(8) will halt the system if sent USR1 signal,ru1999-06-161-5/+12
| | | | | | | | | 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
* Memory management error in init.phk1998-07-221-2/+5
| | | | | | PR: 7320 Reviewed by: phk Submitted by: Anders Thulin <Anders.X.Thulin@telia.se>
* Correct .Nm use. Add rcsid. Use min for minutes instead of mn.charnier1998-07-061-4/+6
|
* Don't assume sigset_t and int are equivalent.jraynard1998-03-021-2/+2
|
* This has always bugged me. At single user, the implied example it givespeter1997-10-101-2/+2
| | | | | | 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.
* Test that rc.shutdown exists before attempting to run it - silentlydavidn1997-08-181-1/+13
| | | | return success if it doesn't to prevent any unwanted error msgs.
* runshutdown(): get rid of getdtablesize loop, it gains nothing nowache1997-08-061-4/+1
| | | | but can waste time if many descriptors are available
* rc.shutdown fixes:ache1997-08-061-12/+12
| | | | | | 1) revoke -> HUP 2) controlling terminal already present 3) add missing setprocresources call
* Add /etc/rc.shutdown capability to init.davidn1997-08-021-17/+158
| | | | | Add sample /etc/rc.shutdown (which is just a shell for now). Submitted by: Ollivier Robert <roberto@keltia.freenix.fr>
* Move logwtmp(shutdown) call before any real action in death().ache1997-07-081-4/+4
|
* 1. Replace malloc+bzero by callocache1997-07-051-28/+5
| | | | 2. Revoke internal active session list only now, not whole /etc/ttys
* death: revoke all lines listed in /etc/ttys instead of sending HUPache1997-07-041-3/+27
| | | | to all processes
* Include <libutil.h> instead of private declarationsache1997-07-031-8/+2
|
* Remove unneded cast in login_getclassbyname which cause warningache1997-07-021-2/+2
|
* Attempt to open the device for reading before actually adding the devicepst1997-06-281-1/+14
| | | | | | | | | 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
* Use err(3).charnier1997-06-131-8/+7
|
* Fix mount call for devfs.phk1997-03-301-2/+1
| | | | Submitted by: bde
* Protect from stack overrun via /etc/ttys, which could possibly allow adg1997-02-191-2/+2
| | | | | root user to change the securelevel. Pointed out by Thomas H. Ptacek <tqbf@enteract.com>.
* Style police.davidn1997-01-221-13/+14
|
* Impose login_cap resource limits on processes started by init.davidn1997-01-191-0/+31
| | | | | | | | /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.
* If passed the -d flag, mount devfs on /devphk1996-10-281-1/+12
|
* If root does not have a password, `init' should not ask to enter it.dima1995-11-101-1/+1
| | | | | otherwise it's not possible to get into single-user mode, if root does not have password and console insecure.
* Define TRUE & FALSE rather than depending on bogus #includes.phk1995-10-291-0/+3
|
* Fix init to correctly detect processes that are exiting multiplempp1995-08-081-1/+1
| | | | times per second.
OpenPOWER on IntegriCloud