summaryrefslogtreecommitdiffstats
path: root/etc/rc.d
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>1999-03-28 20:36:03 +0000
committerimp <imp@FreeBSD.org>1999-03-28 20:36:03 +0000
commitcef8c0135112d4b52b152f3def9224e88229fc89 (patch)
treedb1515fdecfc2debfc204bb0a982a1afbd792de8 /etc/rc.d
parentcc8db63d86528268737ccaa24c4b89612ae33c9b (diff)
downloadFreeBSD-src-cef8c0135112d4b52b152f3def9224e88229fc89.zip
FreeBSD-src-cef8c0135112d4b52b152f3def9224e88229fc89.tar.gz
Add two features:
log_in_vain: log_in_vain turns on logging for packets to ports for which there is no listener. rc.sysctl: A generic way to set sysctl values. It reads /etc/syslog.conf and sets values based on that. No /etc/syslog.conf has been checked in yet, and I've not added this to the makefile yet until I get more feedback. Reviewed by: -current, -hackers and bde especially
Diffstat (limited to 'etc/rc.d')
-rw-r--r--etc/rc.d/netoptions8
-rw-r--r--etc/rc.d/network18
-rw-r--r--etc/rc.d/network28
-rw-r--r--etc/rc.d/network38
-rw-r--r--etc/rc.d/routing8
-rw-r--r--etc/rc.d/sysctl13
6 files changed, 48 insertions, 5 deletions
diff --git a/etc/rc.d/netoptions b/etc/rc.d/netoptions
index 12300c0..e913c88 100644
--- a/etc/rc.d/netoptions
+++ b/etc/rc.d/netoptions
@@ -1,6 +1,6 @@
#!/bin/sh -
#
-# $Id: rc.network,v 1.40 1999/03/11 16:17:24 jfitz Exp $
+# $Id: rc.network,v 1.41 1999/03/24 10:28:49 brian Exp $
# From: @(#)netstart 5.9 (Berkeley) 3/30/91
# Note that almost all the user-configurable behavior is no longer in
@@ -151,6 +151,12 @@ network_pass1() {
sysctl -w net.inet.tcp.rfc1323=0 >/dev/null 2>&1
fi
+ if [ -n "$log_in_vain" -a "x$log_in_vain" != "xNO" ] ; then
+ echo -n ' log_in_vain=YES'
+ sysctl -w net.inet.tcp.log_in_vain=1 >/dev/null 2>&1
+ sysctl -w net.inet.udp.log_in_vain=1 >/dev/null 2>&1
+ fi
+
if [ X"$icmp_bmcastecho" = X"YES" ]; then
echo -n ' broadcast ping responses=YES'
sysctl -w net.inet.icmp.bmcastecho=1 >/dev/null 2>&1
diff --git a/etc/rc.d/network1 b/etc/rc.d/network1
index 12300c0..e913c88 100644
--- a/etc/rc.d/network1
+++ b/etc/rc.d/network1
@@ -1,6 +1,6 @@
#!/bin/sh -
#
-# $Id: rc.network,v 1.40 1999/03/11 16:17:24 jfitz Exp $
+# $Id: rc.network,v 1.41 1999/03/24 10:28:49 brian Exp $
# From: @(#)netstart 5.9 (Berkeley) 3/30/91
# Note that almost all the user-configurable behavior is no longer in
@@ -151,6 +151,12 @@ network_pass1() {
sysctl -w net.inet.tcp.rfc1323=0 >/dev/null 2>&1
fi
+ if [ -n "$log_in_vain" -a "x$log_in_vain" != "xNO" ] ; then
+ echo -n ' log_in_vain=YES'
+ sysctl -w net.inet.tcp.log_in_vain=1 >/dev/null 2>&1
+ sysctl -w net.inet.udp.log_in_vain=1 >/dev/null 2>&1
+ fi
+
if [ X"$icmp_bmcastecho" = X"YES" ]; then
echo -n ' broadcast ping responses=YES'
sysctl -w net.inet.icmp.bmcastecho=1 >/dev/null 2>&1
diff --git a/etc/rc.d/network2 b/etc/rc.d/network2
index 12300c0..e913c88 100644
--- a/etc/rc.d/network2
+++ b/etc/rc.d/network2
@@ -1,6 +1,6 @@
#!/bin/sh -
#
-# $Id: rc.network,v 1.40 1999/03/11 16:17:24 jfitz Exp $
+# $Id: rc.network,v 1.41 1999/03/24 10:28:49 brian Exp $
# From: @(#)netstart 5.9 (Berkeley) 3/30/91
# Note that almost all the user-configurable behavior is no longer in
@@ -151,6 +151,12 @@ network_pass1() {
sysctl -w net.inet.tcp.rfc1323=0 >/dev/null 2>&1
fi
+ if [ -n "$log_in_vain" -a "x$log_in_vain" != "xNO" ] ; then
+ echo -n ' log_in_vain=YES'
+ sysctl -w net.inet.tcp.log_in_vain=1 >/dev/null 2>&1
+ sysctl -w net.inet.udp.log_in_vain=1 >/dev/null 2>&1
+ fi
+
if [ X"$icmp_bmcastecho" = X"YES" ]; then
echo -n ' broadcast ping responses=YES'
sysctl -w net.inet.icmp.bmcastecho=1 >/dev/null 2>&1
diff --git a/etc/rc.d/network3 b/etc/rc.d/network3
index 12300c0..e913c88 100644
--- a/etc/rc.d/network3
+++ b/etc/rc.d/network3
@@ -1,6 +1,6 @@
#!/bin/sh -
#
-# $Id: rc.network,v 1.40 1999/03/11 16:17:24 jfitz Exp $
+# $Id: rc.network,v 1.41 1999/03/24 10:28:49 brian Exp $
# From: @(#)netstart 5.9 (Berkeley) 3/30/91
# Note that almost all the user-configurable behavior is no longer in
@@ -151,6 +151,12 @@ network_pass1() {
sysctl -w net.inet.tcp.rfc1323=0 >/dev/null 2>&1
fi
+ if [ -n "$log_in_vain" -a "x$log_in_vain" != "xNO" ] ; then
+ echo -n ' log_in_vain=YES'
+ sysctl -w net.inet.tcp.log_in_vain=1 >/dev/null 2>&1
+ sysctl -w net.inet.udp.log_in_vain=1 >/dev/null 2>&1
+ fi
+
if [ X"$icmp_bmcastecho" = X"YES" ]; then
echo -n ' broadcast ping responses=YES'
sysctl -w net.inet.icmp.bmcastecho=1 >/dev/null 2>&1
diff --git a/etc/rc.d/routing b/etc/rc.d/routing
index 12300c0..e913c88 100644
--- a/etc/rc.d/routing
+++ b/etc/rc.d/routing
@@ -1,6 +1,6 @@
#!/bin/sh -
#
-# $Id: rc.network,v 1.40 1999/03/11 16:17:24 jfitz Exp $
+# $Id: rc.network,v 1.41 1999/03/24 10:28:49 brian Exp $
# From: @(#)netstart 5.9 (Berkeley) 3/30/91
# Note that almost all the user-configurable behavior is no longer in
@@ -151,6 +151,12 @@ network_pass1() {
sysctl -w net.inet.tcp.rfc1323=0 >/dev/null 2>&1
fi
+ if [ -n "$log_in_vain" -a "x$log_in_vain" != "xNO" ] ; then
+ echo -n ' log_in_vain=YES'
+ sysctl -w net.inet.tcp.log_in_vain=1 >/dev/null 2>&1
+ sysctl -w net.inet.udp.log_in_vain=1 >/dev/null 2>&1
+ fi
+
if [ X"$icmp_bmcastecho" = X"YES" ]; then
echo -n ' broadcast ping responses=YES'
sysctl -w net.inet.icmp.bmcastecho=1 >/dev/null 2>&1
diff --git a/etc/rc.d/sysctl b/etc/rc.d/sysctl
new file mode 100644
index 0000000..8b1f447
--- /dev/null
+++ b/etc/rc.d/sysctl
@@ -0,0 +1,13 @@
+#!/bin/sh
+#
+# Read in /etc/sysctl.conf and set things accordingly
+#
+# $Id:$
+if [ -f /etc/sysctl.conf ]; then
+ 3< /etc/sysctl.conf
+ while read 0<&3 var;
+ do
+ sysctl -w $var
+ done
+ 3<&-
+fi
OpenPOWER on IntegriCloud