head	1.11;
access;
symbols
	RELENG_6_4_0_RELEASE:1.7.2.2
	RELENG_6_4:1.7.2.2.0.8
	RELENG_6_4_BP:1.7.2.2
	RELENG_6_3_0_RELEASE:1.7.2.2
	RELENG_6_3:1.7.2.2.0.6
	RELENG_6_3_BP:1.7.2.2
	RELENG_6_2_0_RELEASE:1.7.2.2
	RELENG_6_2:1.7.2.2.0.4
	RELENG_6_2_BP:1.7.2.2
	RELENG_5_5_0_RELEASE:1.5.2.1
	RELENG_5_5:1.5.2.1.0.6
	RELENG_5_5_BP:1.5.2.1
	RELENG_6_1_0_RELEASE:1.7.2.2
	RELENG_6_1:1.7.2.2.0.2
	RELENG_6_1_BP:1.7.2.2
	RELENG_6_0_0_RELEASE:1.7
	RELENG_6_0:1.7.0.4
	RELENG_6_0_BP:1.7
	RELENG_6:1.7.0.2
	RELENG_6_BP:1.7
	RELENG_5_4_0_RELEASE:1.5.2.1
	RELENG_5_4:1.5.2.1.0.4
	RELENG_5_4_BP:1.5.2.1
	RELENG_5_3_0_RELEASE:1.5.2.1
	RELENG_5_3:1.5.2.1.0.2
	RELENG_5_3_BP:1.5.2.1
	RELENG_5:1.5.0.2
	RELENG_5_BP:1.5
	RELENG_5_2_1_RELEASE:1.4
	RELENG_5_2_0_RELEASE:1.4
	RELENG_5_2:1.4.0.4
	RELENG_5_2_BP:1.4
	RELENG_5_1_0_RELEASE:1.4
	RELENG_5_1:1.4.0.2
	RELENG_5_1_BP:1.4
	RELENG_5_0_0_RELEASE:1.2
	RELENG_5_0:1.2.0.2
	RELENG_5_0_BP:1.2;
locks; strict;
comment	@# @;


1.11
date	2005.10.29.05.12.14;	author yar;	state dead;
branches;
next	1.10;

1.10
date	2005.10.28.16.10.56;	author yar;	state Exp;
branches;
next	1.9;

1.9
date	2005.10.28.16.07.52;	author yar;	state Exp;
branches;
next	1.8;

1.8
date	2005.10.23.14.06.53;	author yar;	state Exp;
branches;
next	1.7;

1.7
date	2004.12.15.12.39.28;	author brian;	state Exp;
branches
	1.7.2.1;
next	1.6;

1.6
date	2004.10.07.13.55.26;	author mtm;	state Exp;
branches;
next	1.5;

1.5
date	2004.03.08.12.25.05;	author pjd;	state Exp;
branches
	1.5.2.1;
next	1.4;

1.4
date	2003.04.18.17.55.05;	author mtm;	state Exp;
branches;
next	1.3;

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

1.2
date	2002.10.12.10.31.31;	author schweikh;	state Exp;
branches;
next	1.1;

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

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

1.7.2.1
date	2005.12.22.09.06.07;	author dougb;	state Exp;
branches;
next	1.7.2.2;

1.7.2.2
date	2006.01.21.22.42.43;	author yar;	state dead;
branches;
next	;


desc
@@


1.11
log
@Transforming "ppp-user" into just "ppp", step 5:
Finally, delete the old, unfittingly named file "ppp-user".
@
text
@#!/bin/sh
#
# $FreeBSD: src/etc/rc.d/ppp-user,v 1.10 2005/10/28 16:10:56 yar Exp $
#

# PROVIDE: ppp
# REQUIRE: netif isdnd
# KEYWORD: nojail

. /etc/rc.subr

name="ppp"
rcvar=`set_rcvar`
command="/usr/sbin/${name}"
start_precmd="ppp_precmd"
start_postcmd="ppp_postcmd"

ppp_precmd()
{
	# Establish ppp mode.
	#
	if [ "${ppp_mode}" != "ddial" -a "${ppp_mode}" != "direct" \
		-a "${ppp_mode}" != "dedicated" \
		-a "${ppp_mode}" != "background" ]; then
		ppp_mode="auto"
	fi

	rc_flags="$rc_flags -quiet -${ppp_mode}"

	# Switch on NAT mode?
	#
	case ${ppp_nat} in
	[Yy][Ee][Ss])
		rc_flags="$rc_flags -nat"
		;;
	esac

	rc_flags="$rc_flags ${ppp_profile}"
}

ppp_postcmd()
{
	# Re-Sync ipfilter so it picks up any new network interfaces
	#
	/etc/rc.d/ipfilter resync
}

load_rc_config $name
run_rc_command "$1"
@


1.10
log
@Use:

	command="/path/to/${name}"

since it's applicable here.  It's the current style of rc.d.

Pointed out by:	pjd
@
text
@d3 1
a3 1
# $FreeBSD$
@


1.9
log
@Transforming "ppp-user" into just "ppp", step 1:
The rcorder(8) condition PROVIDE'd by the script
and REQUIRE'd by the others becomes "ppp".

The ultimate goal of the transformation is to reduce
confusion resulting from the fact that $name has been
"ppp" already.

Discussed with: pjd, -rc
@
text
@d14 1
a14 1
command="/usr/sbin/ppp"
@


1.8
log
@Don't be lazy, set the "command" variable even if
/etc/defaults/rc.conf will provide foo_program, too.
By specifying "command" we explicitly say that we're
going to rely on rc.subr(8) default methods, and
rc.subr(8) will take advantage of this soon.

The majority of our rc.d scripts already set "command"
if appropriate, so fix just the non-compliant handful.
@
text
@d6 1
a6 1
# PROVIDE: ppp-user
@


1.7
log
@Use rc.subr

PR:		72505
Submitted by:	Amir Shalem <amir@@active.ath.cx>
@
text
@d14 1
@


1.7.2.1
log
@The new rc.subr requires explicit declaration of the command, and this
was fixed in the new ppp script, but I did not merge the ppp-user -> ppp
change, so this got missed. Mea culpa.

Submitted by:	Greg Rivers <gcr+freebsd-stable@@tharned.org>
@
text
@a13 1
command="/usr/sbin/${name}"
@


1.7.2.2
log
@MFC:
Rename the rc.d script "ppp-user" to just "ppp".
@
text
@d3 1
a3 1
# $FreeBSD: src/etc/rc.d/ppp-user,v 1.7.2.1 2005/12/22 09:06:07 dougb Exp $
@


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

Discussed with: dougb, brooks
MFC after: 3 days
@
text
@d13 3
a15 3
rcvar="ppp_enable"
start_cmd="ppp_start"
stop_cmd=":"
d17 1
a17 1
ppp_start()
d27 1
a27 1
	ppp_command="/usr/sbin/ppp -quiet -${ppp_mode}"
d33 1
a33 1
		ppp_command="${ppp_command} -nat"
d37 2
a38 4
	ppp_command="${ppp_command} ${ppp_profile}"

	echo "Starting ppp as \"${ppp_user}\""
	su -m ${ppp_user} -c "exec ${ppp_command}"
d40 2
@


1.5
log
@Mark scripts as not usable inside a jail by adding keyword 'nojail'.

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


1.5.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
@d8 1
a8 1
# KEYWORD: nojail
@


1.4
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
@d8 1
a8 1
# KEYWORD: FreeBSD
@


1.3
log
@Start isdnd before ppp for those folks who use ppp-over-isdn.

Approved by: markm (mentor)
@
text
@d7 1
a7 1
# REQUIRE: network1 isdnd
@


1.2
log
@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
@
text
@d7 1
a7 1
# REQUIRE: network1
@


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
@d22 3
a24 3
	    -a "${ppp_mode}" != "dedicated" \
	    -a "${ppp_mode}" != "background" ]; then
	    ppp_mode="auto"
@

