Commit Graph

251 Commits

Author SHA1 Message Date
Doug Barton
385a585a4b Introduce the option of running fsck -y if the initial preen fails.
Defaults to off.

Obtained from:	Yahoo!
2001-02-05 04:54:42 +00:00
Brian Somers
12e0a85bba Run purgedir (a local function) on /var/run instead of rm /var/run/*
PR:		24612
Submitted by:	David Drum <david@mu.org>
2001-01-30 10:07:03 +00:00
Doug Barton
f8c1282a0b Add the options of which cron program to run, and specifying flags
to it.

PR:		conf/24358
Submitted by:	Gerhard Sittig <Gerhard.Sittig@gmx.net>
2001-01-21 20:57:38 +00:00
Dag-Erling Smørgrav
ffefd50ada Add a sysvipc_enable variable that causes the SysV IPC modules to be loaded.
Reviewed by:	dougb
2001-01-16 20:05:05 +00:00
Doug Barton
10fe5181ec Move the process of storing entropy from /dev/random and reseeding with
it at boot time closer to the way we want it to be in the final version.

* Move the default directory to /var/db/entropy
* Run the entropy saving cron job every 11 minutes. This seems
  to be a better default, although still bikeshed material.
* Feed /dev/random some cheesy "entropy" from various commands
  and files before the disks are mounted. This gives /dev/random
  a better chance of running without blocking early.
* Move the reseeding with previously stored entropy to the point
  immediately after the disks are mounted.
* Make the harvesting script a little safer in regards to the
  possibility of accidentally overwriting something other
  than a regular file.
2001-01-14 07:18:31 +00:00
Doug Barton
27a803d631 Add a system to save entropy from /dev/random periodically so that
it can be used to reseed at boot time. This will greatly increase
the chances that there will be sufficient entropy available at
boot time to prevent long delays.

For /etc/rc, remove the vmstat and iostat runs from the attempt
to provide some cheesy randomness if the files fail, since
those programs are dynamically linked, and ldd seems to want
some randomness to do its magic.

Guidance and parameters for this project were provided by
Mark Murray, based on the requirements of the Yarrow
algorithm. Some helpful suggestions for implementation
(including the tip about iostat and vmstat) were provided
by Sheldon Hearn. All blame for problems or mistakes is
mine of course.
2001-01-11 13:01:20 +00:00
Brian S. Dean
15b27f3bba Add portmap as a dependency for NIS client and server.
Requested by:	gallatin
2001-01-11 02:11:14 +00:00
John Baldwin
dbbd9a3121 Move the syscons configuration to a machine independent rc.syscons. The
syscons sh code was identical on both platforms except for whitespace
differences.
2001-01-09 22:28:17 +00:00
Doug Barton
fcc66fcfa9 In addition to:
Apply a more consistent style to the echo statements in /etc/ scripts.
* Put quotes around each line
* Single quotes for lines with no variable interpolation
* Double quotes if there is
* Capitalize each word that begins a line
* Make echo -n 'Doing foo:' ... echo '.' more of a standard

Also:
* Use rm -f on /var/run/dev.db so if it's not there (devfs) it doesn't error
* Shorten the ldconfig messages so that the default fits on one line
* Test whether /var/msgs/bounds is a link before overwriting it
* Generally futz around with whitespace
2000-12-17 08:24:49 +00:00
Brian S. Dean
3306abc459 Flesh out a simple framework for dependency checking rc.conf enabled
services.  Simple YES/NO style *_enable services are supported.

Reviewed by:	obrien
2000-12-13 19:17:54 +00:00
Brian S. Dean
5d24b61a76 If portmap is started as a dependancy, echo a notice during boot.
Approved by:	obrien
2000-12-13 00:43:10 +00:00
David E. O'Brien
0a8b5f7590 Set portmap_enable if Amd or running as an NFS server is enabled.
This bites too many systems upgrading from our change in defaults.
2000-12-11 22:47:50 +00:00
Doug Barton
4c6250e510 Do a better job of preserving the value rc is called with
in the face of possible corruption by rc.diskless*.

PR:		misc/21904
Submitted by:	Anton Voronin, anton@urc.ac.ru
2000-11-21 04:21:54 +00:00
Poul-Henning Kamp
175c38cf60 On DEVFS machines, the device name database is no use. 2000-10-22 19:10:13 +00:00
Jordan K. Hubbard
1d745d28e0 Redirect the stderr of dd to /dev/null so the user doesn't see rather
weird dd output on bootup as /dev/random is being reseeded.  Also,
can't this happen in the background since /dev/random blocks?
2000-10-20 17:41:46 +00:00
John W. De Boskey
b082b24f98 Use dd to better block the data being sent to /dev/random.
Note: I am not redirecting stdout so that the amount of
      data being transferred can be seen (22k and 576k currently).
2000-10-18 05:29:26 +00:00
John W. De Boskey
991c4ad814 Style fix only.
init 6 vs. /sbin/reboot problem still exists (pr 14829)

Submitted by:	Doug Barton <DougB@gorean.org>
2000-10-16 06:16:44 +00:00
John W. De Boskey
bfb80de42d Having played with this commit request for a few hours, I've
convinced myself that it's better then what we have, but still
not perfect.

/etc/rc  : Attempt to seed /dev/random with multiple backoffs.

/etc/rc.shutdown : Attempt to write the entropy_file.

In debugging the above changes, I've run into some
inconsistancies... rc.shutdown is run via 'init 6', but
does not appear to be run via '/sbin/reboot'. Thus, this
set of changes improves life depending on the mechanism
used to shut the system down.

Submitted by:	Doug Barton <DougB@gorean.org>
Approved by:	markm
2000-10-16 04:44:35 +00:00
Mark Murray
318cc4ad59 Reseed the random device as early as possible to prevent hangs,
and provide some form of entropy in case there is no seed file
to prevent a reboot from hanging unnecessarily.
2000-10-14 12:56:08 +00:00
Andrey A. Chernov
88820203d4 "fix" savecore by moving dev_mkdb before it to allow device name sensing 2000-10-12 21:40:04 +00:00
Ruslan Ermilov
9667076c85 Turn the verbose mode on for dumpon(8). 2000-10-12 10:34:59 +00:00
David E. O'Brien
a1c43e3fbb Add copyright notices. Other systems have been barrowing our /etc files
w/o giving any credit.
2000-10-08 19:20:36 +00:00
Sheldon Hearn
c5fd1a4192 Only whack pseudo-terminals into shape if they exist. They might
not yet exist in the DEVFS case.
2000-08-21 14:37:52 +00:00
Sheldon Hearn
cbc43d2db3 After some discussion with markm, back out most of rev 1.221,
which really wasn't such a hot idea in retrospect.

If the random device isn't available, it probably isn't wanted.
If it's wanted, it should be enabled in loader.conf.
2000-08-21 14:33:20 +00:00
Sheldon Hearn
0d077fc6b2 The output of this script got a little broken in rev 1.225, with
the output for the linux_enable and svr4_enable stuff "floating
in the middle of nowhere".

Give them their own section, called "additional ABI support".
2000-08-18 08:11:23 +00:00
Sheldon Hearn
b53cf64a81 Don't rely on a shell scripts to do the simple job of loading
kernel modules for ibcs2_enable and svr4_enable.

Don't rely on a shell script to do the neglibly less simple
job of loading a kernel module and running one command for
linux_enable.

These shell scripts are going away.
2000-08-18 08:07:02 +00:00
David E. O'Brien
3f6c47f3ec Move the running of the Linux and SVR4 compat bits to the arch independent
location.

Sponsored by:   LinuxWorld frustration
2000-08-15 18:02:49 +00:00
John Polstra
e9edb38551 Add an rc.conf knob "ldconfig_insecure" to disable ldconfig's
security checks.  Set the default to NO, i.e., secure.

Submitted by:	Maxime Henrion <mhenrion@cybercable.fr>
2000-08-11 03:26:30 +00:00
Brian Somers
3ebdf3366d Improve purgedir():
Fix leading & trailing space handling

  Suggested by: ben

  Handle files beginning with - correctly
  Don't follow symlinks (cd /var/spool/lock; ln -s /. horror)
2000-08-09 09:23:30 +00:00
Brian Somers
440972bd2b Don't use find(1) before nfs filesystems have been mounted as
it lives in /usr/bin.  Instead, locate files manually.

Note, only *files* under /var/spool/lock are now deleted rather
than everything that's not a directory.  I think this is more
correct, but if anyone disagrees please feel free to change it.

Problem pointed out by: bde
2000-08-08 13:30:27 +00:00
Sheldon Hearn
ae193fb45b If the initial attempt to write ${entropy_file} to /dev/random fails
and the randomdev.ko module is not resident, try to load the module and
perform the write again.

Reviewed by:	markm
2000-07-24 13:40:41 +00:00
Sheldon Hearn
7a414e32d7 Improve on previous commit:
Don't inhibit the trailing newline for entropy-related messages.
Try harder to save the seed file on shutdown.

Reviewed by:	markm
2000-07-17 13:39:48 +00:00
Mark Murray
b74aa5644c Add entropy caching. With this, some entropy is cached at shutdown
time, and this is used to reseed the random number generator at
boot time.

NOTE - this has no hope of working if you halt(); you need to
execute rc.shutdown to get the entropy stash.
2000-07-17 12:28:58 +00:00
Brian Somers
60b2dc71d9 Don't attempt to rm directories under /var/spool/lock. 2000-06-08 08:57:35 +00:00
Jeroen Ruigrok van der Werven
615f500a83 Sanitise NFS fs mounting for /usr NFS mounts.
Submitted by:	Doug Barton <DougB@gorean.org>
Reviewed by:	bde
2000-05-29 12:31:26 +00:00
David Nugent
dbd73b6bb2 Pedantic change: "reboot" -> "boot" 2000-05-11 06:31:59 +00:00
Sheldon Hearn
f66e7afa28 Add to defaults/rc.conf a new function source_rc_confs which rc
scripts may use to source safely overrides in ${rc_conf_files}
files.

This protects users who insist on the bad practice of copying
/etc/defaults/rc.conf to /etc/rc.conf from a recursive loop
that exhausts available file descriptors.

Several people have expressed interest in breaking this function
out into its own shell script.  Anyone who wants to embark on
such an undertaking would do well to study the attributed PR.

PR:		17595
Reported by:	adrian
Submitted by:	Doug Barton <Doug@gorean.org>
2000-04-27 08:43:49 +00:00
Dan Moschuk
b4479f319e s/grep/grep -q
Submitted by: ru
2000-03-27 16:36:25 +00:00
Dan Moschuk
8e5649e4ab Only tell the user that we're Mounting NFS file systems when we have NFS
file systems to mount.

PR: 17594
Submitted by: Doug Barton <Doug@gorean.org>
2000-03-25 16:17:53 +00:00
Mark Murray
20fb384ee0 Get the order of things right; the keys need to be generated
early to allow entropy to replenish.
sshd must start late to catch the full effects of ldconfig.
2000-02-28 19:54:06 +00:00
Yoshinobu Inoue
0908c83946 Add IPv6 configuration scripts.
Initial version created by, and kindly much tested by:
	bmah@CA.Sandia.GOV (Bruce A. Mah)

Approved by: jkh

Reviewed by: bmah@CA.Sandia.GOV (Bruce A. Mah),
	Ollivier Robert <roberto@keltia.freenix.fr>
Obtained from: KAME project
2000-02-23 18:05:58 +00:00
Nick Sayer
3ca9ee77a9 /dev/vn0b is a character device now.
Approved by:	jkh
2000-02-03 06:06:36 +00:00
Brian Feldman
ab80d6fabc This is another in Martin Blapp's N-series of mount-related cleanups :)
Changes are:
 - rpc.umntall is called at the right places now in /etc/rc*
 - rpc.umntall timeout has been lowered from two days (too high) to one
 - verbose messages in rpc.umntall have been clarified
 - kill double entries in /var/db/mounttab when rpc.umntall is invoked
 - ${early_nfs_mounts} has been removed from /etc/rc
 - patched mount(8) -p to print different pass/dump values for ufs filesystems.
   (last patch recieved from dan <bugg@bugg.strangled.net>)

Submitted by:	Martin Blapp <mbr@imp.ch>, dan <bugg@bugg.strangled.net>
2000-01-15 14:28:14 +00:00
Peter Wemm
a519749105 Third try.. Avoid filenames with spaces in them.
PR:		15937
Pointed out by:	Koga Youichirou <y-koga@jp.FreeBSD.org>
2000-01-06 14:27:37 +00:00
Peter Wemm
857dc42503 Missed a filename variable quote in rc 2000-01-05 09:19:27 +00:00
Peter Wemm
57c96870e6 Quote arguments in vi recover script.
PR:		15901
Submitted by:	KOJIMA Hajime <kjm@rins.ryukoku.ac.jp>
2000-01-05 08:17:18 +00:00
Peter Wemm
7ad20304af Remove kvm_mkdb as it isn't installed anymore. libkvm asks directly
via kldsym(2), and crash dumps use nlist directly (and always have).
1999-12-27 07:43:07 +00:00
David E. O'Brien
ad7e21c510 Install sendmail.cf into /etc/mail.
The current offical Sendmail Inc. version uses /var/mail/ and when we upgrade
our repository to that version, we will get the change.  It is best to make
the path change in 4.0-R (which may not have the latest Sendmail Inc. version,
than to change in mid-4.x stream when we may upgrade.

Ok'ed by:	Peter (quite a while ago)
1999-12-19 22:05:32 +00:00
Andrey A. Chernov
3999be82fa Call rpc.umntall only if nfs_client_enable, hang occurse otherwise 1999-11-30 03:34:01 +00:00
Matthew Dillon
a69497d73f 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