head	1.4;
access;
symbols
	RELENG_5_1_0_RELEASE:1.2
	RELENG_5_1:1.2.0.2
	RELENG_5_1_BP:1.2
	RELENG_5_0_0_RELEASE:1.1
	RELENG_5_0:1.1.0.2
	RELENG_5_0_BP:1.1;
locks; strict;
comment	@# @;


1.4
date	2003.08.29.13.25.08;	author mtm;	state dead;
branches;
next	1.3;

1.3
date	2003.08.06.00.35.13;	author mtm;	state Exp;
branches;
next	1.2;

1.2
date	2003.05.05.15.38.41;	author mtm;	state Exp;
branches;
next	1.1;

1.1
date	2002.06.13.22.14.36;	author gordon;	state Exp;
branches;
next	;


desc
@@


1.4
log
@Remove deprecated files no longer neccesary as part of rc.d. Include
a note in UPDATING about removing them from current installations.
@
text
@#!/bin/sh
#
# $FreeBSD: src/etc/rc.d/localdaemons,v 1.3 2003/08/06 00:35:13 mtm Exp $
#

# PROVIDE: localdaemons
# REQUIRE: abi
# BEFORE:  securelevel
# KEYWORD: FreeBSD nostart

. /etc/rc.subr

name="localdaemons"
start_cmd="locald_start"
stop_cmd="locald_stop"

locald_start()
{
	# For each dir in $local_startup, search for init scripts matching *.sh
	#
	case ${local_startup} in
	[Nn][Oo] | '')
		;;
	*)
		echo -n 'Local package initialization:'
		slist=""
		if [ -z "${script_name_sep}" ]; then
			script_name_sep=" "
		fi
		for dir in ${local_startup}; do
			if [ -d "${dir}" ]; then
				for script in ${dir}/*.sh; do
					slist="${slist}${script_name_sep}${script}"
				done
			fi
		done
		script_save_sep="$IFS"
		IFS="${script_name_sep}"
		for script in ${slist}; do
			if [ -x "${script}" ]; then
				(set -T
				trap 'exit 1' 2
				${script} start)
			elif [ -f "${script}" -o -L "${script}" ]; then
				echo -n " (skipping ${script##*/}, not executable)"
			fi
		done
		IFS="${script_save_sep}"
		echo '.'
		;;
	esac
}

locald_stop()
{
	echo -n 'Shutting down daemon processes:'

	# For each dir in $local_startup, search for init scripts matching *.sh
	case ${local_startup} in
	[Nn][Oo] | '')
		;;
	*)
		slist=""
		if [ -z "${script_name_sep}" ]; then
			script_name_sep=" "
		fi
		for dir in ${local_startup}; do
			if [ -d "${dir}" ]; then
				for script in ${dir}/*.sh; do
					slist="${slist}${script_name_sep}${script}"
				done
			fi
		done
		script_save_sep="$IFS"
		IFS="${script_name_sep}"
		for script in `reverse_list ${slist}`; do
			if [ -x "${script}" ]; then
				(set -T
				trap 'exit 1' 2
				${script} stop)
			fi
		done
		IFS="${script_save_sep}"
		echo '.'
		;;
	esac
}

load_rc_config $name
run_rc_command "$1"
@


1.3
log
@Rename localdaemons to localpkg.
The original name was really a mistake since
/usr/local/etc/rc.d scripts can (and usually do) start
more than just daemons. Even the output in the script
uses 'local packages.' Also, the term 'local daemons' is
used by rc.d/local, which was etc/rc.local of rcOG fame.
No repo-copy because there isn't much history to save.
I will remove localdaemons shortly with all the other
files that don't belong in rc.d anymore.

Discussed with:	dougb, freebsd-rc@@yahoogroups.com
@
text
@d3 1
a3 1
# $FreeBSD$
@


1.2
log
@Move securelevel further back in the boot order.

Approved by:	markm (mentor)(implicit)
Reviewed by:	dougb
@
text
@d9 1
a9 1
# KEYWORD: FreeBSD shutdown
@


1.1
log
@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
@
text
@d8 1
@

