Commit Graph

23 Commits

Author SHA1 Message Date
Doug Barton
801c438304 Prepare for the removal of set_rcvar() by changing the rcvar=
assignments to the literal values it would have returned.

The concept of set_rcvar() was nice in theory, but the forks
it creates are a drag on the startup process, which is especially
noticeable on slower systems, such as embedded ones.

During the discussion on freebsd-rc@ a preference was expressed for
using ${name}_enable instead of the literal values. However the
code portability concept doesn't really apply since there are so
many other places where the literal name has to be searched for
and replaced. Also, using the literal value is also a tiny bit
faster than dereferencing the variables, and every little bit helps.
2012-01-14 02:18:41 +00:00
Ed Maste
66e5a431cf Protect cross-script invocation by checking that the target script exists.
This allows pruning of rc.d scripts without getting too many ugly boottime
error messages.

Inspired by phk's r128714 change to netif.
2009-09-14 16:52:38 +00:00
Doug Barton
2b9851690c As previously discussed, add the svn:executable property to all scripts 2008-07-16 19:22:48 +00:00
Bjoern A. Zeeb
2e598474fa Remove ISDN4BSD (I4B) from HEAD as it is not MPSAFE and
parts relied on the now removed NET_NEEDS_GIANT.
Most of I4B has been disconnected from the build
since July 2007 in HEAD/RELENG_7.

This is what was removed:
- configuration in /etc/isdn
- examples
- man pages
- kernel configuration
- sys/i4b (drivers, layers, include files)
- user space tools
- i4b support from ppp
- further documentation

Discussed with: rwatson, re
2008-05-26 10:40:09 +00:00
Brooks Davis
30b6f51afe Declare _ppp_profile_cleaned, _punct, and _punct_c local in
ppp_start_profile().

Reported by:	yar
MFC after:	1 week
2008-04-10 01:32:49 +00:00
Brooks Davis
ef09860eca Fix a stupid typo.
Reviewed by:	bz
2008-04-06 20:39:33 +00:00
Brooks Davis
14b0729b93 Add support for hardwiring ppp sessions to particular devices with new
per-profile variables of the form ppp_<profile>_unit.  No ppp_unit
variable is supported since tying the same unit to more than one profile
won't work.

PR:		conf/122127
MFC after:	1 week
2008-03-28 07:57:52 +00:00
Brooks Davis
6ea3dc3746 Allow the characters .-+/ to appear in ppp profile names by folding them
to _ when evaluating ppp_<profile>_nat and ppp_<profile>_mode.  Document
the per-profile variables.

PR:		conf/121452, conf/122127 (partial)
MFC after:	1 week
2008-03-26 21:54:48 +00:00
Mike Makonnen
ae4d6ea88f Generally, anything that runs rc.d scripts internally should
start using the quiet prefix (i.e. quietstart, quietstop, etc...).
2008-01-26 14:02:19 +00:00
Maksim Yevmenkin
69204f46de Teach /etc/rc.d/ppp how to start/stop individual instances
of ppp. This is an extension of previous commit.

Submitted by:	Yuri Kurenkov < y dot kurenkov at init dot ru >
Reviewed by:	mtm
MFC after:	3 days
2007-10-18 17:10:40 +00:00
Maksim Yevmenkin
b1e50be2c6 Teach /etc/rc.d/ppp to start multiple instances of ppp.
ppp_profile variable can now contain multiple profiles.
Overrides for ppp mode and nat can go into ppp_$profile_mode
and ppp_$profile_nat variables respectively. If those are
not specified, defaults from ppp_mode and ppp_nat are used.

Submitted by:	Yuri Kurenkov < y dot kurenkov at init dot ru >
Reviewed by:	mtm
MFC after:	1 week
2007-10-12 16:35:36 +00:00
Mike Makonnen
0a9b210037 Make subroutine names more conformant with other scripts in rc.d.
MFC After: 2 weeks
2007-03-31 09:03:38 +00:00
Tai-hwa Liang
7e75ef1374 Re-sync'ing pf rules in post command as we already did for ipfilter.
With this patch, pf rules with dynamically created devices such like tun0
works without further intervention.

Reviewed by:	mlaier
MFC after:	3 days
2006-10-26 00:29:43 +00:00
Yaroslav Tykhiy
b29890a328 Use:
command="/path/to/${name}"

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

Pointed out by:	pjd
2005-10-28 16:10:56 +00:00
Yaroslav Tykhiy
23b50ea745 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
2005-10-28 16:07:52 +00:00
Yaroslav Tykhiy
180e996dfc 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.
2005-10-23 14:06:53 +00:00
Brian Somers
f6370f2735 Use rc.subr
PR:		72505
Submitted by:	Amir Shalem <amir@active.ath.cx>
2004-12-15 12:39:28 +00:00
Mike Makonnen
337338ee00 Remove the requirement for the FreeBSD keyword as it no longer
makes any sense.

Discussed with: dougb, brooks
MFC after: 3 days
2004-10-07 13:55:26 +00:00
Pawel Jakub Dawidek
bd57d5b0f5 Mark scripts as not usable inside a jail by adding keyword 'nojail'.
Some suggestions from:	rwatson, Ruben de Groot <mail25@bzerk.org>
2004-03-08 12:25:05 +00:00
Mike Makonnen
459e7c4314 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)
2003-04-18 17:55:05 +00:00
Mike Makonnen
4d1483b4fe Start isdnd before ppp for those folks who use ppp-over-isdn.
Approved by: markm (mentor)
2003-01-25 23:03:48 +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
Gordon Tetlow
27bc1b287e 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-06-13 22:14:37 +00:00