head	1.17;
access;
symbols
	RELENG_8_4:1.17.0.2
	RELENG_9_1_0_RELEASE:1.16.16.1.4.2
	RELENG_9_1:1.16.16.1.0.4
	RELENG_9_1_BP:1.16.16.1
	RELENG_8_3_0_RELEASE:1.16.10.1.8.1
	RELENG_8_3:1.16.10.1.0.8
	RELENG_8_3_BP:1.16.10.1
	RELENG_9_0_0_RELEASE:1.16.16.1.2.1
	RELENG_9_0:1.16.16.1.0.2
	RELENG_9_0_BP:1.16.16.1
	RELENG_9:1.16.0.16
	RELENG_9_BP:1.16
	RELENG_7_4_0_RELEASE:1.16.14.1
	RELENG_8_2_0_RELEASE:1.16.10.1.6.1
	RELENG_7_4:1.16.0.14
	RELENG_7_4_BP:1.16
	RELENG_8_2:1.16.10.1.0.6
	RELENG_8_2_BP:1.16.10.1
	RELENG_8_1_0_RELEASE:1.16.10.1.4.1
	RELENG_8_1:1.16.10.1.0.4
	RELENG_8_1_BP:1.16.10.1
	RELENG_7_3_0_RELEASE:1.16.12.1
	RELENG_7_3:1.16.0.12
	RELENG_7_3_BP:1.16
	RELENG_8_0_0_RELEASE:1.16.10.1.2.1
	RELENG_8_0:1.16.10.1.0.2
	RELENG_8_0_BP:1.16.10.1
	RELENG_8:1.16.0.10
	RELENG_8_BP:1.16
	RELENG_7_2_0_RELEASE:1.16.8.1
	RELENG_7_2:1.16.0.8
	RELENG_7_2_BP:1.16
	RELENG_7_1_0_RELEASE:1.16.6.1
	RELENG_6_4_0_RELEASE:1.15.12.1
	RELENG_7_1:1.16.0.6
	RELENG_7_1_BP:1.16
	RELENG_6_4:1.15.0.12
	RELENG_6_4_BP:1.15
	RELENG_7_0_0_RELEASE:1.16
	RELENG_6_3_0_RELEASE:1.15
	RELENG_7_0:1.16.0.4
	RELENG_7_0_BP:1.16
	RELENG_6_3:1.15.0.10
	RELENG_6_3_BP:1.15
	RELENG_7:1.16.0.2
	RELENG_7_BP:1.16
	RELENG_6_2_0_RELEASE:1.15
	RELENG_6_2:1.15.0.8
	RELENG_6_2_BP:1.15
	RELENG_5_5_0_RELEASE:1.14.2.1
	RELENG_5_5:1.14.2.1.0.6
	RELENG_5_5_BP:1.14.2.1
	RELENG_6_1_0_RELEASE:1.15
	RELENG_6_1:1.15.0.6
	RELENG_6_1_BP:1.15
	RELENG_6_0_0_RELEASE:1.15
	RELENG_6_0:1.15.0.4
	RELENG_6_0_BP:1.15
	RELENG_6:1.15.0.2
	RELENG_6_BP:1.15
	RELENG_5_4_0_RELEASE:1.14.2.1
	RELENG_5_4:1.14.2.1.0.4
	RELENG_5_4_BP:1.14.2.1
	RELENG_5_3_0_RELEASE:1.14.2.1
	RELENG_5_3:1.14.2.1.0.2
	RELENG_5_3_BP:1.14.2.1
	RELENG_5:1.14.0.2
	RELENG_5_BP:1.14
	RELENG_5_2_1_RELEASE:1.13
	RELENG_5_2_0_RELEASE:1.13
	RELENG_5_2:1.13.0.2
	RELENG_5_2_BP:1.13
	RELENG_5_1_0_RELEASE:1.12
	RELENG_5_1:1.12.0.2
	RELENG_5_1_BP:1.12
	RELENG_5_0_0_RELEASE:1.11
	RELENG_5_0:1.11.0.2
	RELENG_5_0_BP:1.11
	old_RELENG_4_6_1_RELEASE:1.6.2.3
	old_RELENG_4_6_0_RELEASE:1.6.2.3
	old_RELENG_4_6:1.6.2.3.0.4
	old_RELENG_4_6_BP:1.6.2.3
	old_RELENG_4_5_0_RELEASE:1.6.2.3
	old_RELENG_4_5:1.6.2.3.0.2
	old_RELENG_4_5_BP:1.6.2.3
	old_RELENG_4_4_0_RELEASE:1.6.2.2
	old_RELENG_4_4:1.6.2.2.0.4
	old_RELENG_4_4_BP:1.6.2.2
	old_RELENG_4_3_0_RELEASE:1.6.2.2
	old_RELENG_4_3:1.6.2.2.0.2
	old_RELENG_4_3_BP:1.6.2.2
	old_RELENG_4_2_0_RELEASE:1.6.2.1
	old_RELENG_4_1_1_RELEASE:1.6
	old_PRE_SMPNG:1.6
	old_RELENG_4_1_0_RELEASE:1.6
	old_RELENG_3_5_0_RELEASE:1.2.2.1
	old_RELENG_4_0_0_RELEASE:1.6
	old_RELENG_4:1.6.0.2
	old_RELENG_4_BP:1.6
	old_RELENG_3_4_0_RELEASE:1.2.2.1
	old_RELENG_3_3_0_RELEASE:1.2.2.1
	old_RELENG_3_2_PAO:1.2.0.4
	old_RELENG_3_2_PAO_BP:1.2
	old_RELENG_3_2_0_RELEASE:1.2
	old_RELENG_3_1_0_RELEASE:1.2
	old_RELENG_3:1.2.0.2
	old_RELENG_3_BP:1.2
	old_RELENG_3_0_0_RELEASE:1.2;
locks; strict;
comment	@# @;


1.17
date	2012.11.17.01.49.04;	author svnexp;	state Exp;
branches
	1.17.2.1;
next	1.16;

1.16
date	2006.12.31.10.37.18;	author yar;	state Exp;
branches
	1.16.2.1
	1.16.6.1
	1.16.8.1
	1.16.10.1
	1.16.12.1
	1.16.14.1
	1.16.16.1;
next	1.15;

1.15
date	2004.10.07.13.55.25;	author mtm;	state Exp;
branches
	1.15.2.1
	1.15.12.1;
next	1.14;

1.14
date	2004.03.08.12.25.05;	author pjd;	state Exp;
branches
	1.14.2.1;
next	1.13;

1.13
date	2003.07.28.13.30.42;	author harti;	state Exp;
branches;
next	1.12;

1.12
date	2003.04.18.17.55.05;	author mtm;	state Exp;
branches;
next	1.11;

1.11
date	2002.09.30.08.01.43;	author mdodd;	state Exp;
branches;
next	1.10;

1.10
date	2002.06.13.22.14.36;	author gordon;	state Exp;
branches;
next	1.9;

1.9
date	2001.11.14.06.35.43;	author sheldonh;	state Exp;
branches;
next	1.8;

1.8
date	2000.12.17.08.15.57;	author dougb;	state Exp;
branches;
next	1.7;

1.7
date	2000.10.08.19.18.24;	author obrien;	state Exp;
branches;
next	1.6;

1.6
date	2000.02.15.13.21.43;	author phk;	state Exp;
branches
	1.6.2.1;
next	1.5;

1.5
date	99.09.13.15.44.18;	author sheldonh;	state Exp;
branches;
next	1.4;

1.4
date	99.08.27.23.23.43;	author peter;	state Exp;
branches;
next	1.3;

1.3
date	99.08.25.16.01.34;	author sheldonh;	state Exp;
branches;
next	1.2;

1.2
date	98.10.08.08.56.01;	author phk;	state Exp;
branches
	1.2.2.1;
next	1.1;

1.1
date	98.10.06.19.24.14;	author phk;	state Exp;
branches;
next	;

1.17.2.1
date	2012.11.17.01.49.04;	author svnexp;	state dead;
branches;
next	1.17.2.2;

1.17.2.2
date	2013.03.28.13.02.43;	author svnexp;	state Exp;
branches;
next	;

1.16.2.1
date	2012.11.17.08.01.20;	author svnexp;	state Exp;
branches;
next	;

1.16.6.1
date	2008.11.25.02.59.29;	author kensmith;	state Exp;
branches;
next	;

1.16.8.1
date	2009.04.15.03.14.26;	author kensmith;	state Exp;
branches;
next	;

1.16.10.1
date	2009.08.03.08.13.06;	author kensmith;	state Exp;
branches
	1.16.10.1.2.1
	1.16.10.1.4.1
	1.16.10.1.6.1
	1.16.10.1.8.1;
next	1.16.10.2;

1.16.10.2
date	2012.11.17.10.35.56;	author svnexp;	state Exp;
branches;
next	;

1.16.10.1.2.1
date	2009.10.25.01.10.29;	author kensmith;	state Exp;
branches;
next	;

1.16.10.1.4.1
date	2010.06.14.02.09.06;	author kensmith;	state Exp;
branches;
next	;

1.16.10.1.6.1
date	2010.12.21.17.09.25;	author kensmith;	state Exp;
branches;
next	;

1.16.10.1.8.1
date	2012.03.03.06.15.13;	author kensmith;	state Exp;
branches;
next	1.16.10.1.8.2;

1.16.10.1.8.2
date	2012.11.17.08.24.38;	author svnexp;	state Exp;
branches;
next	;

1.16.12.1
date	2010.02.10.00.26.20;	author kensmith;	state Exp;
branches;
next	;

1.16.14.1
date	2010.12.21.17.10.29;	author kensmith;	state Exp;
branches;
next	1.16.14.2;

1.16.14.2
date	2012.11.17.08.16.37;	author svnexp;	state Exp;
branches;
next	;

1.16.16.1
date	2011.09.23.00.51.37;	author kensmith;	state Exp;
branches
	1.16.16.1.2.1
	1.16.16.1.4.1;
next	1.16.16.2;

1.16.16.2
date	2012.11.17.11.36.11;	author svnexp;	state Exp;
branches;
next	;

1.16.16.1.2.1
date	2011.11.11.04.20.22;	author kensmith;	state Exp;
branches;
next	1.16.16.1.2.2;

1.16.16.1.2.2
date	2012.11.17.08.36.11;	author svnexp;	state Exp;
branches;
next	;

1.16.16.1.4.1
date	2012.08.05.23.54.33;	author kensmith;	state Exp;
branches;
next	1.16.16.1.4.2;

1.16.16.1.4.2
date	2012.11.17.08.47.01;	author svnexp;	state Exp;
branches;
next	;

1.15.2.1
date	2012.11.17.07.39.06;	author svnexp;	state Exp;
branches;
next	;

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

1.14.2.1
date	2004.10.10.09.50.53;	author mtm;	state Exp;
branches;
next	;

1.6.2.1
date	2000.10.30.10.40.11;	author obrien;	state Exp;
branches;
next	1.6.2.2;

1.6.2.2
date	2001.01.14.09.47.48;	author dougb;	state Exp;
branches;
next	1.6.2.3;

1.6.2.3
date	2001.11.19.10.42.28;	author sheldonh;	state Exp;
branches;
next	;

1.2.2.1
date	99.08.29.14.18.54;	author peter;	state Exp;
branches;
next	;


desc
@@


1.17
log
@Switching exporter and resync
@
text
@#!/bin/sh
#
# Copyright (c) 2000  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: head/etc/rc.d/atm1 180563 2008-07-16 19:22:48Z dougb $
#

# PROVIDE: atm1
# REQUIRE: root
# BEFORE: netif
# KEYWORD: nojail

. /etc/rc.subr

name="atm"
rcvar="atm_enable"
start_cmd="atm_start"
stop_cmd=":"

# ATM networking startup script
#
# Initial interface configuration.
# N.B. /usr is not mounted.
#
atm_start()
{
	if [ -n "${natm_interfaces}" ] ; then
		# Load the HARP pseudo interface
		load_kld if_harp || return 1

		# Load all the NATM drivers that we need
		for natm in ${natm_interfaces} ; do
			ifconfig ${natm} up
		done
	fi

	# Load loadable HARP drivers
	for dev in ${atm_load} ; do
		load_kld ${dev} || return 1
	done

	# Locate all probed ATM adapters
	atmdev=`atm sh stat int | while read dev junk; do
		case ${dev} in
		hea[0-9] | hea[0-9][0-9])
			echo "${dev} "
			;;
		hfa[0-9] | hfa[0-9][0-9])
			echo "${dev} "
			;;
		idt[0-9] | idt[0-9][0-9])
			echo "${dev} "
			;;

		# NATM interfaces per pseudo driver
		en[0-9] | en[0-9][0-9])
			echo "${dev} "
			;;
		fatm[0-9] | fatm[0-9][0-9])
			echo "${dev} "
			;;
		hatm[0-9] | hatm[0-9][0-9])
			echo "${dev} "
			;;
		patm[0-9] | patm[0-9][0-9])
			echo "${dev} "
			;;
		*)
			continue
			;;
		esac
	done`

	if [ -z "${atmdev}" ]; then
		echo 'No ATM adapters found'
		return 0
	fi

	# Load microcode into FORE adapters (if needed)
	if [ `expr "${atmdev}" : '.*hfa.*'` -ne 0 ]; then
		fore_dnld
	fi

	# Configure physical interfaces
	ilmid=0
	for phy in ${atmdev}; do
		echo -n "Configuring ATM device ${phy}:"

		# Define network interfaces
		eval netif_args=\$atm_netif_${phy}
		if [ -n "${netif_args}" ]; then
			atm set netif ${phy} ${netif_args} || continue
		else
			echo ' missing network interface definition'
			continue
		fi

		# Override physical MAC address
		eval macaddr_args=\$atm_macaddr_${phy}
		if [ -n "${macaddr_args}" ]; then
			case ${macaddr_args} in
			[Nn][Oo] | '')
				;;
			*)
				atm set mac ${phy} ${macaddr_args} || continue
				;;
			esac
		fi

		# Configure signalling manager
		eval sigmgr_args=\$atm_sigmgr_${phy}
		if [ -n "${sigmgr_args}" ]; then
			atm attach ${phy} ${sigmgr_args} || continue
		else
			echo ' missing signalling manager definition'
			continue
		fi

		# Configure UNI NSAP prefix
		eval prefix_args=\$atm_prefix_${phy}
		if [ `expr "${sigmgr_args}" : '[uU][nN][iI].*'` -ne 0 ]; then
			if [ -z "${prefix_args}" ]; then
				echo ' missing NSAP prefix for UNI interface'
				continue
			fi

			case ${prefix_args} in
			ILMI)
				ilmid=1
				;;
			*)
				atm set prefix ${phy} ${prefix_args} || continue
				;;
			esac
		fi

		atm_phy="${atm_phy} ${phy}"
		echo '.'
	done

	echo -n 'Starting initial ATM daemons:'
	# Start ILMI daemon (if needed)
	case ${ilmid} in
	1)
		echo -n ' ilmid'
		ilmid
		;;
	esac

	echo '.'
}

load_rc_config $name
run_rc_command "$1"
@


1.17.2.1
log
@file atm1 was added on branch RELENG_8_4 on 2013-03-28 13:02:43 +0000
@
text
@d1 176
@


1.17.2.2
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/248810
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@a0 176
#!/bin/sh
#
# Copyright (c) 2000  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: releng/8.4/etc/rc.d/atm1 180563 2008-07-16 19:22:48Z dougb $
#

# PROVIDE: atm1
# REQUIRE: root
# BEFORE: netif
# KEYWORD: nojail

. /etc/rc.subr

name="atm"
rcvar="atm_enable"
start_cmd="atm_start"
stop_cmd=":"

# ATM networking startup script
#
# Initial interface configuration.
# N.B. /usr is not mounted.
#
atm_start()
{
	if [ -n "${natm_interfaces}" ] ; then
		# Load the HARP pseudo interface
		load_kld if_harp || return 1

		# Load all the NATM drivers that we need
		for natm in ${natm_interfaces} ; do
			ifconfig ${natm} up
		done
	fi

	# Load loadable HARP drivers
	for dev in ${atm_load} ; do
		load_kld ${dev} || return 1
	done

	# Locate all probed ATM adapters
	atmdev=`atm sh stat int | while read dev junk; do
		case ${dev} in
		hea[0-9] | hea[0-9][0-9])
			echo "${dev} "
			;;
		hfa[0-9] | hfa[0-9][0-9])
			echo "${dev} "
			;;
		idt[0-9] | idt[0-9][0-9])
			echo "${dev} "
			;;

		# NATM interfaces per pseudo driver
		en[0-9] | en[0-9][0-9])
			echo "${dev} "
			;;
		fatm[0-9] | fatm[0-9][0-9])
			echo "${dev} "
			;;
		hatm[0-9] | hatm[0-9][0-9])
			echo "${dev} "
			;;
		patm[0-9] | patm[0-9][0-9])
			echo "${dev} "
			;;
		*)
			continue
			;;
		esac
	done`

	if [ -z "${atmdev}" ]; then
		echo 'No ATM adapters found'
		return 0
	fi

	# Load microcode into FORE adapters (if needed)
	if [ `expr "${atmdev}" : '.*hfa.*'` -ne 0 ]; then
		fore_dnld
	fi

	# Configure physical interfaces
	ilmid=0
	for phy in ${atmdev}; do
		echo -n "Configuring ATM device ${phy}:"

		# Define network interfaces
		eval netif_args=\$atm_netif_${phy}
		if [ -n "${netif_args}" ]; then
			atm set netif ${phy} ${netif_args} || continue
		else
			echo ' missing network interface definition'
			continue
		fi

		# Override physical MAC address
		eval macaddr_args=\$atm_macaddr_${phy}
		if [ -n "${macaddr_args}" ]; then
			case ${macaddr_args} in
			[Nn][Oo] | '')
				;;
			*)
				atm set mac ${phy} ${macaddr_args} || continue
				;;
			esac
		fi

		# Configure signalling manager
		eval sigmgr_args=\$atm_sigmgr_${phy}
		if [ -n "${sigmgr_args}" ]; then
			atm attach ${phy} ${sigmgr_args} || continue
		else
			echo ' missing signalling manager definition'
			continue
		fi

		# Configure UNI NSAP prefix
		eval prefix_args=\$atm_prefix_${phy}
		if [ `expr "${sigmgr_args}" : '[uU][nN][iI].*'` -ne 0 ]; then
			if [ -z "${prefix_args}" ]; then
				echo ' missing NSAP prefix for UNI interface'
				continue
			fi

			case ${prefix_args} in
			ILMI)
				ilmid=1
				;;
			*)
				atm set prefix ${phy} ${prefix_args} || continue
				;;
			esac
		fi

		atm_phy="${atm_phy} ${phy}"
		echo '.'
	done

	echo -n 'Starting initial ATM daemons:'
	# Start ILMI daemon (if needed)
	case ${ilmid} in
	1)
		echo -n ' ilmid'
		ilmid
		;;
	esac

	echo '.'
}

load_rc_config $name
run_rc_command "$1"
@


1.16
log
@Use $required_modules wherever suitable.  Use load_kld() in special
cases.  So we get rid of quite a few lines of duplicated code.
@
text
@d27 1
a27 1
# $FreeBSD$
@


1.16.2.1
log
@Switch importer
@
text
@d27 1
a27 1
# $FreeBSD: stable/7/etc/rc.d/atm1 220110 2011-03-28 19:29:30Z dougb $
@


1.16.16.1
log
@SVN rev 225736 on 2011-09-23 00:51:37Z by kensmith

Copy head to stable/9 as part of 9.0-RELEASE release cycle.

Approved by:	re (implicit)
@
text
@@


1.16.16.2
log
@## SVN ##
## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/ 242902
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ## r242902 | dteske | 2012-11-11 23:29:45 +0000 (Sun, 11 Nov 2012) | 10 lines
## SVN ##
## SVN ## Fix a regression introduced by SVN r211417 that saw the breakage of a feature
## SVN ## documented in usr.sbin/sysinstall/help/shortcuts.hlp (reproduced below):
## SVN ##
## SVN ## If /usr/sbin/sysinstall is linked to another filename, say
## SVN ## `/usr/local/bin/configPackages', then the basename will be used
## SVN ## as an implicit command name.
## SVN ##
## SVN ## Reviewed by:	adrian (co-mentor)
## SVN ## Approved by:	adrian (co-mentor)
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ##
@
text
@d27 1
a27 1
# $FreeBSD: stable/9/etc/rc.d/atm1 180563 2008-07-16 19:22:48Z dougb $
@


1.16.16.1.4.1
log
@SVN rev 239080 on 2012-08-05 23:54:33Z by kensmith

Copy stable/9 to releng/9.1 as part of the 9.1-RELEASE release process.

Approved by:	re (implicit)
@
text
@@


1.16.16.1.4.2
log
@Switch importer
@
text
@d27 1
a27 1
# $FreeBSD: releng/9.1/etc/rc.d/atm1 180563 2008-07-16 19:22:48Z dougb $
@


1.16.16.1.2.1
log
@SVN rev 227445 on 2011-11-11 04:20:22Z by kensmith

Copy stable/9 to releng/9.0 as part of the FreeBSD 9.0-RELEASE release
cycle.

Approved by:	re (implicit)
@
text
@@


1.16.16.1.2.2
log
@Switch importer
@
text
@d27 1
a27 1
# $FreeBSD: releng/9.0/etc/rc.d/atm1 180563 2008-07-16 19:22:48Z dougb $
@


1.16.14.1
log
@SVN rev 216618 on 2010-12-21 17:10:29Z by kensmith

Copy stable/7 to releng/7.4 in preparation for FreeBSD-7.4 release.

Approved by:	re (implicit)
@
text
@@


1.16.14.2
log
@Switch importer
@
text
@d27 1
a27 1
# $FreeBSD: releng/7.4/etc/rc.d/atm1 165683 2006-12-31 10:37:18Z yar $
@


1.16.12.1
log
@SVN rev 203736 on 2010-02-10 00:26:20Z by kensmith

Copy stable/7 to releng/7.3 as part of the 7.3-RELEASE process.

Approved by:	re (implicit)
@
text
@@


1.16.10.1
log
@SVN rev 196045 on 2009-08-03 08:13:06Z by kensmith

Copy head to stable/8 as part of 8.0 Release cycle.

Approved by:	re (Implicit)
@
text
@@


1.16.10.2
log
@## SVN ##
## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/ 242909
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ## r242909 | dim | 2012-11-12 07:47:19 +0000 (Mon, 12 Nov 2012) | 20 lines
## SVN ##
## SVN ## MFC r242625:
## SVN ##
## SVN ## Remove duplicate const specifiers in many drivers (I hope I got all of
## SVN ## them, please let me know if not).  Most of these are of the form:
## SVN ##
## SVN ## static const struct bzzt_type {
## SVN ##       [...list of members...]
## SVN ## } const bzzt_devs[] = {
## SVN ##       [...list of initializers...]
## SVN ## };
## SVN ##
## SVN ## The second const is unnecessary, as arrays cannot be modified anyway,
## SVN ## and if the elements are const, the whole thing is const automatically
## SVN ## (e.g. it is placed in .rodata).
## SVN ##
## SVN ## I have verified this does not change the binary output of a full kernel
## SVN ## build (except for build timestamps embedded in the object files).
## SVN ##
## SVN ## Reviewed by:	yongari, marius
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ##
@
text
@d27 1
a27 1
# $FreeBSD: stable/8/etc/rc.d/atm1 180563 2008-07-16 19:22:48Z dougb $
@


1.16.10.1.8.1
log
@SVN rev 232438 on 2012-03-03 06:15:13Z by kensmith

Copy stable/8 to releng/8.3 as part of 8.3-RELEASE release cycle.

Approved by:	re (implicit)
@
text
@@


1.16.10.1.8.2
log
@Switch importer
@
text
@d27 1
a27 1
# $FreeBSD: releng/8.3/etc/rc.d/atm1 180563 2008-07-16 19:22:48Z dougb $
@


1.16.10.1.6.1
log
@SVN rev 216617 on 2010-12-21 17:09:25Z by kensmith

Copy stable/8 to releng/8.2 in preparation for FreeBSD-8.2 release.

Approved by:	re (implicit)
@
text
@@


1.16.10.1.4.1
log
@SVN rev 209145 on 2010-06-14 02:09:06Z by kensmith

Copy stable/8 to releng/8.1 in preparation for 8.1-RC1.

Approved by:	re (implicit)
@
text
@@


1.16.10.1.2.1
log
@SVN rev 198460 on 2009-10-25 01:10:29Z by kensmith

Copy stable/8 to releng/8.0 as part of 8.0-RELEASE release procedure.

Approved by:	re (implicit)
@
text
@@


1.16.8.1
log
@SVN rev 191087 on 2009-04-15 03:14:26Z by kensmith

Create releng/7.2 from stable/7 in preparation for 7.2-RELEASE.

Approved by:	re (implicit)
@
text
@@


1.16.6.1
log
@SVN rev 185281 on 2008-11-25 02:59:29Z by kensmith

Create releng/7.1 in preparation for moving into RC phase of 7.1 release
cycle.

Approved by:	re (implicit)
@
text
@@


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

Discussed with: dougb, brooks
MFC after: 3 days
@
text
@d51 1
a51 1
		kldstat -v | grep -q if_harp || kldload if_harp
d61 1
a61 1
		kldstat -v | grep -q ${dev} || kldload ${dev}
@


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


1.15.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.14
log
@Mark scripts as not usable inside a jail by adding keyword 'nojail'.

Some suggestions from:	rwatson, Ruben de Groot <mail25@@bzerk.org>
@
text
@d33 1
a33 1
# KEYWORD: FreeBSD nojail
@


1.14.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
a33 1
# KEYWORD: nojail
@


1.13
log
@Convert the atm{2,3}.sh rc scripts to normal rc.d scripts. Add support
for the harp(4) pseudo driver and for loadable native HARP drivers
(like hfa_pci).

To use harp(4) the rc variable natm_interfaces must be set to the
list of NATM interfaces to be used for HARP. These interfaces
will be brought up with ifconfig and the harp(4) will be loaded.

To use loadable native HARP drivers atm_load must be set to
the list of drivers to load.

Reviewed by:	mtm, gordon (partly)
@
text
@d33 1
a33 1
# KEYWORD: FreeBSD
@


1.12
log
@o Hook the new files up to the build.
o Make sure all the scripts reference rc.d/netif and not rc.d/network1

Approved by:	markm (mentor)
@
text
@d49 15
d74 14
@


1.11
log
@- Recognize 'idt' interfaces.
- The start command is 'atm_start' not 'start_cmd'.
@
text
@d32 1
a32 1
# BEFORE: network1
@


1.10
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
@d47 1
a47 1
start_cmd()
d56 3
@


1.9
log
@Avoid unnecessary calls to expr(1) by using standard shell arithmetic
expansion instead.
@
text
@d27 1
a27 1
# $FreeBSD: src/etc/rc.atm,v 1.8 2000/12/17 08:15:57 dougb Exp $
d30 12
a41 1
#
d47 2
a48 1
atm_pass1() {
a140 1
	atm_pass1_done=YES
d143 2
a144 86
#
# Finish up configuration.
# N.B. /usr is not mounted.
#
atm_pass2() {
	echo -n 'Configuring ATM network interfaces:'

	atm_scspd=0
	atm_atmarpd=""

	# Configure network interfaces
	for phy in ${atm_phy}; do
		eval netif_args=\$atm_netif_${phy}
		set -- ${netif_args}
		netname=$1
		netcnt=$2
		netindx=0
		while [ ${netindx} -lt ${netcnt} ]; do
			net="${netname}${netindx}"
			netindx=$((${netindx} + 1))
			echo -n " ${net}"

			# Configure atmarp server
			eval atmarp_args=\$atm_arpserver_${net}
			if [ -n "${atmarp_args}" ]; then
				atm set arpserver ${net} ${atmarp_args} ||
					continue
			fi
			eval scsparp_args=\$atm_scsparp_${net}

			case ${scsparp_args} in
			[Yy][Ee][Ss])
				case ${atmarp_args} in
				local)
					;;
				*)
					echo ' local arpserver required for SCSP'
					continue
					;;
				esac

				atm_atmarpd="${atm_atmarpd} ${net}"
				atm_scspd=1
			esac
		done
	done
	echo '.'

	# Define any PVCs.
	if [ -n "${atm_pvcs}" ]; then
		for i in ${atm_pvcs}; do
			eval pvc_args=\$atm_pvc_${i}
			atm add pvc ${pvc_args}
		done
	fi

	# Define any permanent ARP entries.
	if [ -n "${atm_arps}" ]; then
		for i in ${atm_arps}; do
			eval arp_args=\$atm_arp_${i}
			atm add arp ${arp_args}
		done
	fi
	atm_pass2_done=YES
}

#
# Start any necessary daemons.
#
atm_pass3() {
	# Start SCSP daemon (if needed)
	case ${atm_scspd} in
	1)
		echo -n ' scspd'
		scspd
		;;
	esac

	# Start ATMARP daemon (if needed)
	if [ -n "${atm_atmarpd}" ]; then
		echo -n ' atmarpd'
		atmarpd ${atm_atmarpd}
	fi

	atm_pass3_done=YES
}
@


1.8
log
@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

No functionality changes
@
text
@d27 1
a27 1
# $FreeBSD: src/etc/rc.atm,v 1.7 2000/10/08 19:18:24 obrien Exp $
d151 1
a151 1
			netindx=`expr ${netindx} + 1`
@


1.7
log
@Add copyright notices.  Other systems have been barrowing our /etc files
w/o giving any credit.
@
text
@d27 1
a27 1
# $FreeBSD: src/etc/rc.atm,v 1.6 2000/02/15 13:21:43 phk Exp $
d53 1
a53 1
		echo "No ATM adapters found."
d72 1
a72 1
			echo "missing network interface definition"
d93 1
a93 1
			echo "missing signalling manager definition"
d101 1
a101 1
				echo "missing NSAP prefix for UNI interface"
d116 1
a116 1
		echo "."
d119 1
a119 1
	echo -n "Starting initial ATM daemons:"
d123 1
a123 1
		echo -n " ilmid"
d128 1
a128 1
	echo "."
d137 1
a137 1
	echo -n "Configuring ATM network interfaces:"
d168 1
a168 1
					echo "local arpserver required for SCSP"
d178 1
a178 1
	echo "."
d205 1
a205 1
		echo -n " scspd"
d212 1
a212 1
		echo -n " atmarpd"
@


1.6
log
@No arguments needed for fore_dnld any longer.

Approved by:	jkh
@
text
@d3 26
d30 1
a31 3
#
# $FreeBSD: src/etc/rc.atm,v 1.5 1999/09/13 15:44:18 sheldonh Exp $

@


1.6.2.1
log
@MFC: Add copyright.
@
text
@d3 2
a4 25
# Copyright (c) 2000  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$
d6 1
a7 2
#
# ATM networking startup script
@


1.6.2.2
log
@MFC, Apply a more consistent style to the echo statements in /etc/ scripts.
@
text
@d27 1
a27 1
# $FreeBSD: src/etc/rc.atm,v 1.6.2.1 2000/10/30 10:40:11 obrien Exp $
d53 1
a53 1
		echo 'No ATM adapters found'
d72 1
a72 1
			echo ' missing network interface definition'
d93 1
a93 1
			echo ' missing signalling manager definition'
d101 1
a101 1
				echo ' missing NSAP prefix for UNI interface'
d116 1
a116 1
		echo '.'
d119 1
a119 1
	echo -n 'Starting initial ATM daemons:'
d123 1
a123 1
		echo -n ' ilmid'
d128 1
a128 1
	echo '.'
d137 1
a137 1
	echo -n 'Configuring ATM network interfaces:'
d168 1
a168 1
					echo ' local arpserver required for SCSP'
d178 1
a178 1
	echo '.'
d205 1
a205 1
		echo -n ' scspd'
d212 1
a212 1
		echo -n ' atmarpd'
@


1.6.2.3
log
@MFC: use shell arithmetic expansion instead of expr(1) where appropriate
@
text
@d27 1
a27 1
# $FreeBSD: src/etc/rc.atm,v 1.6.2.2 2001/01/14 09:47:48 dougb Exp $
d151 1
a151 1
			netindx=$((${netindx} + 1))
@


1.5
log
@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>
@
text
@d6 1
a6 1
# $FreeBSD: src/etc/rc.atm,v 1.4 1999/08/27 23:23:43 peter Exp $
d35 1
a35 1
		fore_dnld -d /etc
@


1.4
log
@$Id$ -> $FreeBSD$
@
text
@d6 1
a6 1
# $FreeBSD$
d13 19
a31 14
    # Locate all probed ATM adapters
    atmdev=`atm sh stat int | while read dev junk; do
	case ${dev} in
	hea[0-9]|hea[0-9][0-9])
		echo "${dev} "
		;;
	hfa[0-9]|hfa[0-9][0-9])
		echo "${dev} "
		;;
	*)
		continue
		;;
	esac
    done`
d33 3
a35 22
    if [ -z "${atmdev}" ]; then
	echo "No ATM adapters found."
	return 0
    fi

    # Load microcode into FORE adapters (if needed)
    if [ `expr "${atmdev}" : '.*hfa.*'` -ne 0 ]; then
	fore_dnld -d /etc
    fi

    # Configure physical interfaces
    ilmid=0
    for phy in ${atmdev}; do
	echo -n "Configuring ATM device ${phy}:"

	# Define network interfaces
	eval netif_args=\$atm_netif_${phy}
	if [ -n "${netif_args}" ]; then
		atm set netif ${phy} ${netif_args} || continue
	else
		echo "missing network interface definition"
		continue
d38 13
a50 5
	# Override physical MAC address
	eval macaddr_args=\$atm_macaddr_${phy}
	if [ -n "${macaddr_args}" -a "${macaddr_args}" != "NO" ]; then
		atm set mac ${phy} ${macaddr_args} || continue
	fi
d52 11
a62 8
	# Configure signalling manager
	eval sigmgr_args=\$atm_sigmgr_${phy}
	if [ -n "${sigmgr_args}" ]; then
		atm attach ${phy} ${sigmgr_args} || continue
	else
		echo "missing signalling manager definition"
		continue
	fi
d64 6
a69 5
	# Configure UNI NSAP prefix
	eval prefix_args=\$atm_prefix_${phy}
	if [ `expr "${sigmgr_args}" : '[uU][nN][iI].*'` -ne 0 ]; then
		if [ -z "${prefix_args}" ]; then
			echo "missing NSAP prefix for UNI interface"
d72 17
a88 4
		if [ "${prefix_args}" = "ILMI" ]; then
			ilmid=1
		else
			atm set prefix ${phy} ${prefix_args} || continue
a89 1
	fi
d91 3
a93 3
	atm_phy="${atm_phy} ${phy}"
	echo "."
    done
d95 8
a102 6
    echo -n "Starting initial ATM daemons:"
    # Start ILMI daemon (if needed)
    if [ ${ilmid} -eq 1 ]; then
	echo -n " ilmid"
	ilmid
    fi
d104 2
a105 2
    echo "."
    atm_pass1_done=YES
d113 1
a113 1
    echo -n "Configuring ATM network interfaces:"
d115 2
a116 2
    atm_scspd=0
    atm_atmarpd=""
d118 17
a134 23
    # Configure network interfaces
    for phy in ${atm_phy}; do
	eval netif_args=\$atm_netif_${phy}
	set -- ${netif_args}
	netname=$1
	netcnt=$2
	netindx=0
	while [ ${netindx} -lt ${netcnt} ]; do

		net="${netname}${netindx}"
		netindx=`expr ${netindx} + 1`
		echo -n " ${net}"

		# Configure atmarp server
		eval atmarp_args=\$atm_arpserver_${net}
		if [ -n "${atmarp_args}" ]; then
			atm set arpserver ${net} ${atmarp_args} || continue
		fi
		eval scsparp_args=\$atm_scsparp_${net}
		if [ "${scsparp_args}" = "YES" ]; then
			if [ "${atmarp_args}" != "local" ]; then
				echo "local arpserver required for SCSP"
				continue
d136 17
a152 3
			atm_atmarpd="${atm_atmarpd} ${net}"
			atm_scspd=1
		fi
d154 1
a154 2
    done
    echo "."
d156 7
a162 7
    # Define any PVCs.
    if [ -n "${atm_pvcs}" ]; then
	for i in ${atm_pvcs}; do
		eval pvc_args=\$atm_pvc_${i}
		atm add pvc ${pvc_args}
	done
    fi
d164 8
a171 8
    # Define any permanent ARP entries.
    if [ -n "${atm_arps}" ]; then
	for i in ${atm_arps}; do
		eval arp_args=\$atm_arp_${i}
		atm add arp ${arp_args}
	done
    fi
    atm_pass2_done=YES
d178 13
a190 11
    # Start SCSP daemon (if needed)
    if [ "${atm_scspd}" -eq 1 ]; then
	echo -n " scspd"
	scspd
    fi

    # Start ATMARP daemon (if needed)
    if [ -n "${atm_atmarpd}" ]; then
	echo -n " atmarpd"
	atmarpd ${atm_atmarpd}
    fi
d192 1
a192 1
    atm_pass3_done=YES
@


1.3
log
@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
@
text
@d6 1
a6 1
#	$Id: rc.atm,v 1.2 1998/10/08 08:56:01 phk Exp $
@


1.2
log
@Avoid using dmesg to find devices, the buffer may not be big enough.

Reviewed by:	phk
Submitted by:	Mike Spengler <mks@@networkcs.com>
@
text
@d6 1
a6 1
#	$Id$
d125 1
a125 1
		if [ "X${scsparp_args}" = X"YES" ]; then
d138 1
a138 1
    if [ "X${atm_pvcs}" != "X" ]; then
d146 1
a146 1
    if [ "X${atm_arps}" != "X" ]; then
d160 1
a160 1
    if [ ${atm_scspd} -eq 1 ]; then
@


1.2.2.1
log
@$Id$ -> $FreeBSD$
@
text
@d6 1
a6 1
# $FreeBSD$
@


1.1
log
@Here are some scripts and man pages for configuring HARP ATM
interfaces.

Reviewed by:	phk
Submitted by:	Mike Spengler <mks@@networkcs.com>
@
text
@d13 2
a14 4
    # Locate all probed ATM adapters by scanning dmesg output
    saveifs="${IFS}"
    IFS=$IFS:
    atmdev=`dmesg | while read dev junk; do
a26 1
    IFS="${saveifs}"
@
