Commit Graph

23 Commits

Author SHA1 Message Date
John Hay
160b4bbe6a Add another backslash ('\'). 2003-02-15 16:29:20 +00:00
Matthew Dillon
eb7bf00306 Do not unconditionally load the configuration files for the RCNG case.
Instead, load them as part of the rc.d system.  This allows us to prioritize
the initidiskless script so it runs before the configuration files are loaded
and allows us to get rid of the exit 2 hack in /etc/rc.  The exit 2 never
worked anyway since it did not unset the prior configuration, causing the
diskless code to not operate properly.

Do a major cleanup and revamping of the diskless code for RCNG.  This will
be backported to the non-RCNG scripts as well as -stable.

With suggestions from: Mike Makonnen <mtm@identd.net>
MFC after:	7 days
2002-12-22 22:18:41 +00:00
Jens Schweikhardt
143085107b Fix style bugs:
* Space -> tabs conversion.
* Removed blanks before semicolon in "if ... ; then".
* Proper indentation of misindented lines.
* Put a full stop after some comments.
* Removed whitespace at end of line.

Approved by:	silence from gordon
2002-10-12 10:31:31 +00:00
Dima Dorfman
2ca85e3d5e In a diskless setup, rc.d/initdiskless may overwrite parts of /etc on
a per-machine or per-cluster (with different ways of expressing what's
part of a cluster) basis.  In order for this to be effective, rc.conf
has to be reread after initdiskless is finished.  Implement this by
adding a hook to etc/rc which rereads rc.conf by request.  This can
also be implemented by renaming initdiskless to initdiskless.sh and
sourcing rc.conf there manually, but it was decided that, that would
be uglier than a hook in etc/rc.

Developed in concert with:	gordon
2002-10-02 00:59:14 +00:00
Poul-Henning Kamp
320d99c058 Use mdmfs(8) rather than rolling our own RAM-disks.
Sponsored by:	DARPA & NAI Labs.
2002-09-22 09:48:02 +00:00
Dima Dorfman
527597b2d9 Stock -current has more than 300 files in /etc, so 255 inodes for the
/etc filesystem isn't enough; consequently, add "-i 4096" to the newfs
command for /etc.  This results in 1022 inodes, which should be enough
for the forseeable future (although I don't know why we would ever
have more than 1000 files in a default /etc).

Silence by:	-current
2002-07-28 03:41:53 +00:00
Gordon Tetlow
242bd45fb4 Merge in all the changes that Mike Makonnen has been maintaining for a
while. This is only the script pieces, the glue for the build comes next.

Submitted by:   Mike Makonnen <makonnen@pacbell.net>
Reviewed by:    silence on -current and -hackers
Prodded by:     rwatson
2002-07-18 05:00:17 +00:00
David E. O'Brien
c1ab4f157d Utilize dhcp information in the kernel environment if we don't have
hostname and DNS information already.

Submitted by:	Danny Braniss <danny@cs.huji.ac.il>
2002-04-22 21:42:18 +00:00
David E. O'Brien
04e7d65aeb The usage of 'newaliases' needs to be after we know for sure that /usr
is mounted.

Submitted by:	rizzo
2002-02-23 01:49:20 +00:00
David E. O'Brien
5158a0f59f The existing bazaar and site-specific policy in rc.diskless1 is Just Wrong;
and looks like no other Unix diskless configuration I've ever seen.
Thus allow a more traditional /etc.

Note, the use of an MFS /var should also be settable.
Otherwise installing ports(packages) is just a total PITA.
2002-02-22 19:05:22 +00:00
Robert Watson
012ccf288b o Improve the line-wrapping of additional comments, some of which appeared
to be wrapped around 60, others around 40 columns.
2002-01-17 00:10:28 +00:00
Robert Watson
4420bc6773 o Remove a somewhat less comprehensible comment about modifying /etc/rc.
o Improve line-wrapping of another comment for consistency.
2002-01-17 00:08:44 +00:00
Robert Watson
6bbc26ef9f Remove incorrect comments about the population of /etc: no attempt is
made to copy the NFS-mounted on to /tmp/etc, instead, it is populated
entirely from /conf/default, then overriden from /conf/IP.
2001-12-26 17:00:55 +00:00
Brian S. Dean
44e0389495 * Simplify the population of the /etc memory filesystem. To avoid
the null mount, we currently create a temporary mfs on /tmp, copy
    /etc to /tmp, then mount /etc as mfs and copy everything back from
    /tmp, then delete the /tmp mfs.

    The patch eliminates the temporary /tmp mfs and the subsequent
    copying and simply populates the /etc mfs by copying from
    /conf/default/etc.  This requires that /conf/default/etc contain a
    complete copy of all the /etc stuff instead of just overrides.  I
    don't think that is too much of an extra step in setting up a
    diskless environment.

  * Provide the ability to make /tmp a memory filesystem independent
    of /var.  This removes the requirement that /tmp be a symlink to
    /var/tmp and this makes the diskless code work with the default
    filesystem layout.  If a seperate /tmp memory filesystem is
    created, the 'tmpsize' environment variable is used to determine
    its size (default to 10 Meg).

  * Reduce diffs between the -current and -stable versions of these
    files to a bare minimum.  Only the definition of the shell
    function 'mount_md' is different.

Not Objected to by: -arch@, -small@

MFC after: 2 days
2001-05-09 15:13:51 +00:00
Warner Losh
9f474ffc5c Move to using md.
o create a simple wrapper function mount_md that makes it easy to
  move from mount_mfs.

# NOTE: you will need to MAKEDEV md[0123] in order for this to work.

Reviewed by: bsd, keichii
2001-04-25 05:46:40 +00:00
Brian S. Dean
58d3c43935 Eliminate the null mount for /etc for diskless clients. 2001-04-20 23:10:11 +00:00
Brian S. Dean
bb09faafdb Change the order in which /etc files are copied into place; copy
default first, then network-specific files, then host-specific files.
I think this was the original intent, as Matt indicated the previous
code appeared to be a bug.
2001-04-03 00:24:01 +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
Luigi Rizzo
4f9b3f5f33 Cleanup diskless support in current, mostly aligning it to the one
in the 3.x branch. Also remove the dependency on /usr to find the
boot address/interface.
Mostly-submitted-abd-tested-by: MIHIRA Sanpei Yoshiro <sanpei@sanpei.org>
2000-01-06 18:17:38 +00:00
Peter Wemm
6cabfb3832 Add/adjust some $FreeBSD$ tags.
Noted by:	Doug <Doug@gorean.org>
1999-09-13 17:09:08 +00:00
Sheldon Hearn
321704296f Apply a consistent style to most of the etc scripts. Particularly, use
case instead of test where appropriate, since case allows case is a sh
builtin and (as a side-effect) allows case-insensitivity.

Changes discussed on freebsd-hackers.

Submitted by:	Doug Barton <Doug@gorean.org>
1999-09-13 15:44:20 +00:00
Sheldon Hearn
b68adff6b7 Style clean-up:
* All variables are now embraced: ${foo}

	* All comparisons against some value now take the form:
	  [ "${foo}" ? "value" ]
	  where ? is a comparison operator

	* All empty string tests now take the form:
	  [ -z "${foo}" ]

	* All non-empty string tests now take the form:
	  [ -n "${foo}" ]

Submitted by:	jkh
1999-08-25 16:01:45 +00:00
Matthew Dillon
e4715b9359 Revamp rc.diskless. Split into rc.diskless1 and rc.diskless2. provide
more opportunities for overriding.  Clean up /etc/rc ( remove conf_dir,
    remove startup mount special cases, remove other special cases )
1999-02-09 17:17:18 +00:00