aboutsummaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorMatthew Dillon <dillon@FreeBSD.org>2000-05-16 06:52:11 +0000
committerMatthew Dillon <dillon@FreeBSD.org>2000-05-16 06:52:11 +0000
commitba3ed2268c6d4dc7a3825318707360908d0ce2f0 (patch)
treef82b8c13caf86e9116f8149cf972a5120f120a80 /etc
parent6d2718d964d489cef5b2725df172a2a6a5d6cc90 (diff)
downloadsrc-ba3ed2268c6d4dc7a3825318707360908d0ce2f0.tar.gz
src-ba3ed2268c6d4dc7a3825318707360908d0ce2f0.zip
Add ipsec_enable and ipsec_file options to run IPSEC's setkey program
with the specified configuration file at the appropriate time.
Notes
Notes: svn path=/head/; revision=60628
Diffstat (limited to 'etc')
-rw-r--r--etc/defaults/rc.conf2
-rw-r--r--etc/network.subr11
-rw-r--r--etc/rc.d/netoptions11
-rw-r--r--etc/rc.d/network111
-rw-r--r--etc/rc.d/network211
-rw-r--r--etc/rc.d/network311
-rw-r--r--etc/rc.d/routing11
-rw-r--r--etc/rc.network11
8 files changed, 79 insertions, 0 deletions
diff --git a/etc/defaults/rc.conf b/etc/defaults/rc.conf
index f45269609e90..b11d6572dbbb 100644
--- a/etc/defaults/rc.conf
+++ b/etc/defaults/rc.conf
@@ -156,6 +156,8 @@ nis_yppasswdd_flags="" # Flags to rpc.yppasswdd (if enabled).
defaultrouter="NO" # Set to default gateway (or NO).
static_routes="" # Set to static route list (or leave empty).
gateway_enable="NO" # Set to YES if this host will be a gateway.
+ipsec_enable="NO" # Set to YES to run setkey on ipsec_file
+ipsec_file="/etc/ipsec.conf" # Name of config file for setkey
router_enable="NO" # Set to YES to enable a routing daemon.
router="routed" # Name of routing daemon to use if enabled.
router_flags="-q" # Flags for routing daemon.
diff --git a/etc/network.subr b/etc/network.subr
index e37d25f5746c..fc7cdd07c014 100644
--- a/etc/network.subr
+++ b/etc/network.subr
@@ -352,6 +352,17 @@ network_pass1() {
esac
echo '.'
+ case ${ipsec_enable} in
+ [Yy][Ee][Ss])
+ if [ -f ${ipsec_file} ]; then
+ echo ' ipsec: enabled'
+ setkey -f ${ipsec_file}
+ else
+ echo ' ipsec: file not found'
+ fi
+ ;;
+ esac
+
echo -n 'routing daemons:'
case ${router_enable} in
[Yy][Ee][Ss])
diff --git a/etc/rc.d/netoptions b/etc/rc.d/netoptions
index e37d25f5746c..fc7cdd07c014 100644
--- a/etc/rc.d/netoptions
+++ b/etc/rc.d/netoptions
@@ -352,6 +352,17 @@ network_pass1() {
esac
echo '.'
+ case ${ipsec_enable} in
+ [Yy][Ee][Ss])
+ if [ -f ${ipsec_file} ]; then
+ echo ' ipsec: enabled'
+ setkey -f ${ipsec_file}
+ else
+ echo ' ipsec: file not found'
+ fi
+ ;;
+ esac
+
echo -n 'routing daemons:'
case ${router_enable} in
[Yy][Ee][Ss])
diff --git a/etc/rc.d/network1 b/etc/rc.d/network1
index e37d25f5746c..fc7cdd07c014 100644
--- a/etc/rc.d/network1
+++ b/etc/rc.d/network1
@@ -352,6 +352,17 @@ network_pass1() {
esac
echo '.'
+ case ${ipsec_enable} in
+ [Yy][Ee][Ss])
+ if [ -f ${ipsec_file} ]; then
+ echo ' ipsec: enabled'
+ setkey -f ${ipsec_file}
+ else
+ echo ' ipsec: file not found'
+ fi
+ ;;
+ esac
+
echo -n 'routing daemons:'
case ${router_enable} in
[Yy][Ee][Ss])
diff --git a/etc/rc.d/network2 b/etc/rc.d/network2
index e37d25f5746c..fc7cdd07c014 100644
--- a/etc/rc.d/network2
+++ b/etc/rc.d/network2
@@ -352,6 +352,17 @@ network_pass1() {
esac
echo '.'
+ case ${ipsec_enable} in
+ [Yy][Ee][Ss])
+ if [ -f ${ipsec_file} ]; then
+ echo ' ipsec: enabled'
+ setkey -f ${ipsec_file}
+ else
+ echo ' ipsec: file not found'
+ fi
+ ;;
+ esac
+
echo -n 'routing daemons:'
case ${router_enable} in
[Yy][Ee][Ss])
diff --git a/etc/rc.d/network3 b/etc/rc.d/network3
index e37d25f5746c..fc7cdd07c014 100644
--- a/etc/rc.d/network3
+++ b/etc/rc.d/network3
@@ -352,6 +352,17 @@ network_pass1() {
esac
echo '.'
+ case ${ipsec_enable} in
+ [Yy][Ee][Ss])
+ if [ -f ${ipsec_file} ]; then
+ echo ' ipsec: enabled'
+ setkey -f ${ipsec_file}
+ else
+ echo ' ipsec: file not found'
+ fi
+ ;;
+ esac
+
echo -n 'routing daemons:'
case ${router_enable} in
[Yy][Ee][Ss])
diff --git a/etc/rc.d/routing b/etc/rc.d/routing
index e37d25f5746c..fc7cdd07c014 100644
--- a/etc/rc.d/routing
+++ b/etc/rc.d/routing
@@ -352,6 +352,17 @@ network_pass1() {
esac
echo '.'
+ case ${ipsec_enable} in
+ [Yy][Ee][Ss])
+ if [ -f ${ipsec_file} ]; then
+ echo ' ipsec: enabled'
+ setkey -f ${ipsec_file}
+ else
+ echo ' ipsec: file not found'
+ fi
+ ;;
+ esac
+
echo -n 'routing daemons:'
case ${router_enable} in
[Yy][Ee][Ss])
diff --git a/etc/rc.network b/etc/rc.network
index e37d25f5746c..fc7cdd07c014 100644
--- a/etc/rc.network
+++ b/etc/rc.network
@@ -352,6 +352,17 @@ network_pass1() {
esac
echo '.'
+ case ${ipsec_enable} in
+ [Yy][Ee][Ss])
+ if [ -f ${ipsec_file} ]; then
+ echo ' ipsec: enabled'
+ setkey -f ${ipsec_file}
+ else
+ echo ' ipsec: file not found'
+ fi
+ ;;
+ esac
+
echo -n 'routing daemons:'
case ${router_enable} in
[Yy][Ee][Ss])