summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>1999-07-26 10:49:37 +0000
committerbrian <brian@FreeBSD.org>1999-07-26 10:49:37 +0000
commit03ab8a3b7f99d8f1fc922f681d713dde620b53e6 (patch)
tree139b260d39c89fddc544d66db001ad8bb3d2076b /etc
parentc8bc216749dc518674b11162d798262506b6b390 (diff)
downloadFreeBSD-src-03ab8a3b7f99d8f1fc922f681d713dde620b53e6.zip
FreeBSD-src-03ab8a3b7f99d8f1fc922f681d713dde620b53e6.tar.gz
Add a default ppp.conf (mode 600).
Originally submitted by: Wayne Self <wself@cdrom.com> Allow a ppp startup option in rc.conf. Adjust sysinstall so that it appends to the end of ppp.conf and uses the generated profile to start ppp in auto mode on boot. Submitted by: Josef L. Karthauser <joe@uk.FreeBSD.org>
Diffstat (limited to 'etc')
-rw-r--r--etc/Makefile5
-rw-r--r--etc/defaults/rc.conf9
-rw-r--r--etc/network.subr19
-rw-r--r--etc/ppp/ppp.conf36
-rw-r--r--etc/rc.d/netoptions19
-rw-r--r--etc/rc.d/network119
-rw-r--r--etc/rc.d/network219
-rw-r--r--etc/rc.d/network319
-rw-r--r--etc/rc.d/routing19
-rw-r--r--etc/rc.network19
10 files changed, 174 insertions, 9 deletions
diff --git a/etc/Makefile b/etc/Makefile
index 9ead107..ffb7a7d 100644
--- a/etc/Makefile
+++ b/etc/Makefile
@@ -1,5 +1,5 @@
# from: @(#)Makefile 5.11 (Berkeley) 5/21/91
-# $Id: Makefile,v 1.200 1999/07/09 05:30:33 obrien Exp $
+# $Id: Makefile,v 1.201 1999/07/10 18:02:12 iwasaki Exp $
SUBDIR= sendmail
@@ -24,6 +24,7 @@ MTREE= BSD.include.dist BSD.local.dist BSD.root.dist BSD.usr.dist \
BSD.var.dist BSD.x11.dist
NAMEDB= PROTO.localhost.rev named.conf named.root make-localhost
PPPCNF= ppp.deny ppp.shells.sample
+PPPCF2= ppp.conf
NOSPAM= Makefile README
@@ -79,6 +80,8 @@ distribution:
${NAMEDB} ${DESTDIR}/etc/namedb
cd ${.CURDIR}/ppp; ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 \
${PPPCNF} ${DESTDIR}/etc/ppp
+ cd ${.CURDIR}/ppp; ${INSTALL} -c -o root -g ${BINGRP} -m 600 \
+ ${PPPCF2} ${DESTDIR}/etc/ppp
cd ${.CURDIR}/mail; ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 \
${NOSPAM} ${DESTDIR}/etc/mail
${INSTALL} -c -o ${BINOWN} -g operator -m 664 /dev/null \
diff --git a/etc/defaults/rc.conf b/etc/defaults/rc.conf
index fc1d7ba..d7aa93a 100644
--- a/etc/defaults/rc.conf
+++ b/etc/defaults/rc.conf
@@ -9,7 +9,7 @@
#
# All arguments must be in double or single quotes.
#
-# $Id: rc.conf,v 1.21 1999/07/16 09:26:53 jkh Exp $
+# $Id: rc.conf,v 1.22 1999/07/18 09:58:01 jkh Exp $
##############################################################
### Important initial Boot-time options ####################
@@ -58,6 +58,13 @@ sppp_interfaces="" # List of sppp interfaces.
#sppp_interfaces="isp0" # example: sppp over ISDN
#spppconfig_isp0="authproto=chap myauthname=foo myauthsecret='top secret' hisauthname=some-gw hisauthsecret='another secret'"
+# Use ppp configuration.
+ppp_enable="NO" # Start user-ppp (or NO).
+ppp_mode="auto" # Choice of "auto", "ddial", "direct" or "dedicated".
+ # For details see man page for ppp(8). Default is auto.
+ppp_alias="YES" # Packet aliasing (NAT/masquerading) or NO.
+ppp_profile="papchap" # Which profile to use from /etc/ppp/ppp.conf.
+
### Network daemon (miscellaneous) & NFS options: ###
syslogd_enable="YES" # Run syslog daemon (or NO).
syslogd_flags="" # Flags to syslogd (if enabled).
diff --git a/etc/network.subr b/etc/network.subr
index d0eec1a..007d0f9 100644
--- a/etc/network.subr
+++ b/etc/network.subr
@@ -1,6 +1,6 @@
#!/bin/sh -
#
-# $Id: rc.network,v 1.49 1999/07/08 18:56:02 peter Exp $
+# $Id: rc.network,v 1.50 1999/07/16 09:26:52 jkh Exp $
# From: @(#)netstart 5.9 (Berkeley) 3/30/91
# Note that almost all the user-configurable behavior is no longer in
@@ -144,6 +144,23 @@ network_pass1() {
fi
fi
+ # Warm up user ppp if required.
+ if [ "X$ppp_enable" = X"YES" ]; then
+ # Establish ppp mode.
+ if [ "X$ppp_mode" != X"ddial" -a "X$ppp_mode" != X"direct" \
+ -a "X$ppp_mode" != X"dedicated" ]; then \
+ ppp_mode="auto";
+ fi
+ ppp_command="-${ppp_mode} ";
+
+ # Switch on alias mode?
+ if [ "X$ppp_alias" = X"YES" ]; then
+ ppp_command="${ppp_command} -alias";
+ fi
+
+ echo -n 'Starting ppp: '; ppp ${ppp_command} ${ppp_profile}
+ fi
+
# Additional ATM interface configuration
if [ -n "${atm_pass1_done}" ]; then
atm_pass2
diff --git a/etc/ppp/ppp.conf b/etc/ppp/ppp.conf
new file mode 100644
index 0000000..63ddd33
--- /dev/null
+++ b/etc/ppp/ppp.conf
@@ -0,0 +1,36 @@
+#################################################################
+# PPP Sample Configuration File
+# Originally written by Toshiharu OHNO
+# Simplified 5/14/1999 by wself@cdrom.com
+#
+# $Id$
+#################################################################
+
+default:
+
+ #
+ # Make sure that "device" references the correct serial port
+ # for your modem. (cuaa0 = COM1, cuaa1 = COM2)
+ #
+
+ set device /dev/cuaa1
+
+ set log Phase Chat LCP IPCP CCP tun command
+ set speed 115200
+ set dial "ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \"\" AT OK-AT-OK ATE1Q0 OK \\dATDT\\T TIMEOUT 40 CONNECT"
+
+ set timeout 120
+ set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.0 0.0.0.0
+ add default HISADDR
+ enable dns
+
+papchap:
+
+ #
+ # edit the next three lines and replace the items in caps with
+ # the values which have been assigned by your ISP.
+ #
+
+ set phone PHONE_NUM
+ set authname USERNAME
+ set authkey PASSWORD
diff --git a/etc/rc.d/netoptions b/etc/rc.d/netoptions
index d0eec1a..007d0f9 100644
--- a/etc/rc.d/netoptions
+++ b/etc/rc.d/netoptions
@@ -1,6 +1,6 @@
#!/bin/sh -
#
-# $Id: rc.network,v 1.49 1999/07/08 18:56:02 peter Exp $
+# $Id: rc.network,v 1.50 1999/07/16 09:26:52 jkh Exp $
# From: @(#)netstart 5.9 (Berkeley) 3/30/91
# Note that almost all the user-configurable behavior is no longer in
@@ -144,6 +144,23 @@ network_pass1() {
fi
fi
+ # Warm up user ppp if required.
+ if [ "X$ppp_enable" = X"YES" ]; then
+ # Establish ppp mode.
+ if [ "X$ppp_mode" != X"ddial" -a "X$ppp_mode" != X"direct" \
+ -a "X$ppp_mode" != X"dedicated" ]; then \
+ ppp_mode="auto";
+ fi
+ ppp_command="-${ppp_mode} ";
+
+ # Switch on alias mode?
+ if [ "X$ppp_alias" = X"YES" ]; then
+ ppp_command="${ppp_command} -alias";
+ fi
+
+ echo -n 'Starting ppp: '; ppp ${ppp_command} ${ppp_profile}
+ fi
+
# Additional ATM interface configuration
if [ -n "${atm_pass1_done}" ]; then
atm_pass2
diff --git a/etc/rc.d/network1 b/etc/rc.d/network1
index d0eec1a..007d0f9 100644
--- a/etc/rc.d/network1
+++ b/etc/rc.d/network1
@@ -1,6 +1,6 @@
#!/bin/sh -
#
-# $Id: rc.network,v 1.49 1999/07/08 18:56:02 peter Exp $
+# $Id: rc.network,v 1.50 1999/07/16 09:26:52 jkh Exp $
# From: @(#)netstart 5.9 (Berkeley) 3/30/91
# Note that almost all the user-configurable behavior is no longer in
@@ -144,6 +144,23 @@ network_pass1() {
fi
fi
+ # Warm up user ppp if required.
+ if [ "X$ppp_enable" = X"YES" ]; then
+ # Establish ppp mode.
+ if [ "X$ppp_mode" != X"ddial" -a "X$ppp_mode" != X"direct" \
+ -a "X$ppp_mode" != X"dedicated" ]; then \
+ ppp_mode="auto";
+ fi
+ ppp_command="-${ppp_mode} ";
+
+ # Switch on alias mode?
+ if [ "X$ppp_alias" = X"YES" ]; then
+ ppp_command="${ppp_command} -alias";
+ fi
+
+ echo -n 'Starting ppp: '; ppp ${ppp_command} ${ppp_profile}
+ fi
+
# Additional ATM interface configuration
if [ -n "${atm_pass1_done}" ]; then
atm_pass2
diff --git a/etc/rc.d/network2 b/etc/rc.d/network2
index d0eec1a..007d0f9 100644
--- a/etc/rc.d/network2
+++ b/etc/rc.d/network2
@@ -1,6 +1,6 @@
#!/bin/sh -
#
-# $Id: rc.network,v 1.49 1999/07/08 18:56:02 peter Exp $
+# $Id: rc.network,v 1.50 1999/07/16 09:26:52 jkh Exp $
# From: @(#)netstart 5.9 (Berkeley) 3/30/91
# Note that almost all the user-configurable behavior is no longer in
@@ -144,6 +144,23 @@ network_pass1() {
fi
fi
+ # Warm up user ppp if required.
+ if [ "X$ppp_enable" = X"YES" ]; then
+ # Establish ppp mode.
+ if [ "X$ppp_mode" != X"ddial" -a "X$ppp_mode" != X"direct" \
+ -a "X$ppp_mode" != X"dedicated" ]; then \
+ ppp_mode="auto";
+ fi
+ ppp_command="-${ppp_mode} ";
+
+ # Switch on alias mode?
+ if [ "X$ppp_alias" = X"YES" ]; then
+ ppp_command="${ppp_command} -alias";
+ fi
+
+ echo -n 'Starting ppp: '; ppp ${ppp_command} ${ppp_profile}
+ fi
+
# Additional ATM interface configuration
if [ -n "${atm_pass1_done}" ]; then
atm_pass2
diff --git a/etc/rc.d/network3 b/etc/rc.d/network3
index d0eec1a..007d0f9 100644
--- a/etc/rc.d/network3
+++ b/etc/rc.d/network3
@@ -1,6 +1,6 @@
#!/bin/sh -
#
-# $Id: rc.network,v 1.49 1999/07/08 18:56:02 peter Exp $
+# $Id: rc.network,v 1.50 1999/07/16 09:26:52 jkh Exp $
# From: @(#)netstart 5.9 (Berkeley) 3/30/91
# Note that almost all the user-configurable behavior is no longer in
@@ -144,6 +144,23 @@ network_pass1() {
fi
fi
+ # Warm up user ppp if required.
+ if [ "X$ppp_enable" = X"YES" ]; then
+ # Establish ppp mode.
+ if [ "X$ppp_mode" != X"ddial" -a "X$ppp_mode" != X"direct" \
+ -a "X$ppp_mode" != X"dedicated" ]; then \
+ ppp_mode="auto";
+ fi
+ ppp_command="-${ppp_mode} ";
+
+ # Switch on alias mode?
+ if [ "X$ppp_alias" = X"YES" ]; then
+ ppp_command="${ppp_command} -alias";
+ fi
+
+ echo -n 'Starting ppp: '; ppp ${ppp_command} ${ppp_profile}
+ fi
+
# Additional ATM interface configuration
if [ -n "${atm_pass1_done}" ]; then
atm_pass2
diff --git a/etc/rc.d/routing b/etc/rc.d/routing
index d0eec1a..007d0f9 100644
--- a/etc/rc.d/routing
+++ b/etc/rc.d/routing
@@ -1,6 +1,6 @@
#!/bin/sh -
#
-# $Id: rc.network,v 1.49 1999/07/08 18:56:02 peter Exp $
+# $Id: rc.network,v 1.50 1999/07/16 09:26:52 jkh Exp $
# From: @(#)netstart 5.9 (Berkeley) 3/30/91
# Note that almost all the user-configurable behavior is no longer in
@@ -144,6 +144,23 @@ network_pass1() {
fi
fi
+ # Warm up user ppp if required.
+ if [ "X$ppp_enable" = X"YES" ]; then
+ # Establish ppp mode.
+ if [ "X$ppp_mode" != X"ddial" -a "X$ppp_mode" != X"direct" \
+ -a "X$ppp_mode" != X"dedicated" ]; then \
+ ppp_mode="auto";
+ fi
+ ppp_command="-${ppp_mode} ";
+
+ # Switch on alias mode?
+ if [ "X$ppp_alias" = X"YES" ]; then
+ ppp_command="${ppp_command} -alias";
+ fi
+
+ echo -n 'Starting ppp: '; ppp ${ppp_command} ${ppp_profile}
+ fi
+
# Additional ATM interface configuration
if [ -n "${atm_pass1_done}" ]; then
atm_pass2
diff --git a/etc/rc.network b/etc/rc.network
index d0eec1a..007d0f9 100644
--- a/etc/rc.network
+++ b/etc/rc.network
@@ -1,6 +1,6 @@
#!/bin/sh -
#
-# $Id: rc.network,v 1.49 1999/07/08 18:56:02 peter Exp $
+# $Id: rc.network,v 1.50 1999/07/16 09:26:52 jkh Exp $
# From: @(#)netstart 5.9 (Berkeley) 3/30/91
# Note that almost all the user-configurable behavior is no longer in
@@ -144,6 +144,23 @@ network_pass1() {
fi
fi
+ # Warm up user ppp if required.
+ if [ "X$ppp_enable" = X"YES" ]; then
+ # Establish ppp mode.
+ if [ "X$ppp_mode" != X"ddial" -a "X$ppp_mode" != X"direct" \
+ -a "X$ppp_mode" != X"dedicated" ]; then \
+ ppp_mode="auto";
+ fi
+ ppp_command="-${ppp_mode} ";
+
+ # Switch on alias mode?
+ if [ "X$ppp_alias" = X"YES" ]; then
+ ppp_command="${ppp_command} -alias";
+ fi
+
+ echo -n 'Starting ppp: '; ppp ${ppp_command} ${ppp_profile}
+ fi
+
# Additional ATM interface configuration
if [ -n "${atm_pass1_done}" ]; then
atm_pass2
OpenPOWER on IntegriCloud