head	1.5;
access;
symbols
	RELENG_6_4_0_RELEASE:1.4.12.1
	RELENG_6_4:1.4.0.12
	RELENG_6_4_BP:1.4
	RELENG_6_3_0_RELEASE:1.4
	RELENG_6_3:1.4.0.10
	RELENG_6_3_BP:1.4
	RELENG_6_2_0_RELEASE:1.4
	RELENG_6_2:1.4.0.8
	RELENG_6_2_BP:1.4
	RELENG_5_5_0_RELEASE:1.3.2.1
	RELENG_5_5:1.3.2.1.0.6
	RELENG_5_5_BP:1.3.2.1
	RELENG_6_1_0_RELEASE:1.4
	RELENG_6_1:1.4.0.6
	RELENG_6_1_BP:1.4
	RELENG_6_0_0_RELEASE:1.4
	RELENG_6_0:1.4.0.4
	RELENG_6_0_BP:1.4
	RELENG_6:1.4.0.2
	RELENG_6_BP:1.4
	RELENG_5_4_0_RELEASE:1.3.2.1
	RELENG_5_4:1.3.2.1.0.4
	RELENG_5_4_BP:1.3.2.1
	RELENG_5_3_0_RELEASE:1.3.2.1
	RELENG_5_3:1.3.2.1.0.2
	RELENG_5_3_BP:1.3.2.1
	RELENG_5:1.3.0.2
	RELENG_5_BP:1.3;
locks; strict;
comment	@# @;


1.5
date	2006.08.22.11.12.09;	author flz;	state dead;
branches;
next	1.4;

1.4
date	2004.10.07.13.55.26;	author mtm;	state Exp;
branches
	1.4.2.1
	1.4.12.1;
next	1.3;

1.3
date	2004.04.06.23.15.48;	author wes;	state Exp;
branches
	1.3.2.1;
next	1.2;

1.2
date	2004.04.06.18.26.43;	author wes;	state Exp;
branches;
next	1.1;

1.1
date	2004.03.15.18.36.21;	author wes;	state Exp;
branches;
next	;

1.4.2.1
date	2012.11.17.07.39.09;	author svnexp;	state Exp;
branches;
next	;

1.4.12.1
date	2008.10.02.02.57.24;	author kensmith;	state Exp;
branches;
next	;

1.3.2.1
date	2004.10.10.09.50.54;	author mtm;	state Exp;
branches;
next	;


desc
@@


1.5
log
@- Remove ramdisk rc.d scripts since they've been replaced by mdconfig{,2}.
- Update ObsoleteFiles.inc.

Approved by:	cperciva (mentor)
@
text
@#!/bin/sh -
#
# Copyright (c) 2004  The FreeBSD Project
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
#    notice, this list of conditions and the following disclaimer in the
#    documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
# $FreeBSD: src/etc/rc.d/ramdisk,v 1.4 2004/10/07 13:55:26 mtm Exp $
#

# PROVIDE: ramdisk
# REQUIRE: localswap
# BEFORE: mountcritlocal

. /etc/rc.subr

name="ramdisk"
stop_cmd="ramdisk_stop"
start_cmd="ramdisk_start"

ramdisk_start()
{
	for unit in $ramdisk_units; do
		eval mdoptions=\$ramdisk_${unit}_config
		if [ "$mdoptions" = "${mdoptions##-t}" ]; then
			echo "Type not specified for md$unit"
			continue
		fi
		eval fsoptions=\$ramdisk_${unit}_newfs

		mdconfig -a $mdoptions -u $unit
		newfs $fsoptions /dev/md$unit
	done
}

ramdisk_stop()
{
	for unit in $ramdisk_units
	do
		if [ -c /dev/md$unit ]; then
			umount -f /dev/md$unit > /dev/null 2>&1
			mdconfig -d -u $unit
		fi
	done
}

load_rc_config $name
run_rc_command "$1"

@


1.4
log
@Remove the requirement for the FreeBSD keyword as it no longer
makes any sense.

Discussed with: dougb, brooks
MFC after: 3 days
@
text
@d27 1
a27 1
# $FreeBSD$
@


1.4.2.1
log
@Switch importer
@
text
@d27 1
a27 1
# $FreeBSD: stable/6/etc/rc.d/ramdisk 136224 2004-10-07 13:55:26Z mtm $
@


1.4.12.1
log
@SVN rev 183531 on 2008-10-02 02:57:24Z by kensmith

Create releng/6.4 from stable/6 in preparation for 6.4-RC1.

Approved by:	re (implicit)
@
text
@@


1.3
log
@Style fixes, as suggested by Jens Schweikhardt <schweikh@@schweikhardt.net>
@
text
@a32 1
# KEYWORD: FreeBSD
@


1.3.2.1
log
@RCS file: /home/ncvs/src/etc/rc,v
----------------------------
revision 1.335
date: 2004/10/08 14:23:49;  author: mtm;  state: Exp;  lines: +0 -1
Remove an unused variable.

Submitted by: Pawel Worach <pawel.worach@@telia.com>
----------------------------
revision 1.334
date: 2004/10/07 13:55:25;  author: mtm;  state: Exp;  lines: +1 -1
Remove the requirement for the FreeBSD keyword as it no longer
makes any sense.

Discussed with: dougb, brooks
MFC after: 3 days
=============================================================================
RCS file: /home/ncvs/src/etc/rc.d/nsswitch,v
----------------------------
revision 1.4
date: 2004/09/16 17:03:12;  author: keramida;  state: Exp;  lines: +1 -1
Fix requirement of `network' to `NETWORK' because the former isn't
provided by any rc.d script.

Approved by:	mtm
=============================================================================
RCS file: /home/ncvs/src/etc/rc.d/pflog,v
----------------------------
revision 1.3
date: 2004/09/16 17:04:20;  author: keramida;  state: Exp;  lines: +1 -1
We don't have any providers of `beforenetlkm' in FreeBSD.  Remove the
dependency to it from our rc.d scripts.

Approved by:	mtm
=============================================================================

Approved by: re/scottl
@
text
@d33 1
@


1.2
log
@Split ramdisk processing in two so it can actually work.  Ownerships
and permissions specified per rc.conf(5) now apply both to the md
device and to the mountpoint directory, after the mount has completed.
This has to be done in two steps, because chown is not available
until after /usr has been mounted, but the mdconfig and newfs steps
have to complete before fstab processing.
@
text
@d43 1
a43 2
	for unit in $ramdisk_units
	do
d45 1
a45 2
		if [ "$mdoptions" = "${mdoptions##-t}" ]
		then
d60 1
a60 1
		if [ -c /dev/md$unit ] ; then
@


1.1
log
@Add script for creating ramdisks at boot time, in time to be processed
by fstab.
@
text
@d45 1
a45 5
		if [ -c /dev/md$unit ] ; then
			echo "$0: md$unit exists, skipping"
			continue
		fi
		eval mdoptions=\$ramdisk_${unit}_mdoptions
a51 4
		eval owner=\$ramdisk_${unit}_owner
		eval perms=\$ramdisk_${unit}_perms

		echo Configuring ramdisk /dev/md$unit
a54 2
		[ "X$owner" != "X" ] && chown $owner /dev/md$unit
		[ "X$perms" != "X" ] && chmod $perms /dev/md$unit
a64 1
			echo Recovered ramdisk /dev/md$unit
@

