aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2000-03-07 16:30:13 +0000
committerBill Nottingham <notting@redhat.com>2000-03-07 16:30:13 +0000
commitef502cea44bc382f90da4bce15c2965288986070 (patch)
tree3f27e753991cfe1e1a431e733c1876ccb23197e7
parent7b882448ff09f767f12466180637da8bb043adb8 (diff)
downloadinitscripts-ef502cea44bc382f90da4bce15c2965288986070.tar
initscripts-ef502cea44bc382f90da4bce15c2965288986070.tar.gz
initscripts-ef502cea44bc382f90da4bce15c2965288986070.tar.bz2
initscripts-ef502cea44bc382f90da4bce15c2965288986070.tar.xz
initscripts-ef502cea44bc382f90da4bce15c2965288986070.zip
handle sysctl upgrades better ; re-run sysctl on network start
-rw-r--r--initscripts.spec19
-rwxr-xr-xrc.d/init.d/network2
2 files changed, 21 insertions, 0 deletions
diff --git a/initscripts.spec b/initscripts.spec
index 5dbb8018..bfe967e4 100644
--- a/initscripts.spec
+++ b/initscripts.spec
@@ -144,6 +144,15 @@ if [ "$DEFRAG_IPV4" = "yes" -o "$DEFRAG_IPV4" = "true" ]; then
echo "# added by initscripts install on `date`" >> /etc/sysctl.conf
echo "net.ipv4.ip_always_defrag = 1" >> /etc/sysctl.conf
fi
+
+newnet=`mktemp /etc/sysconfig/network.XXXXXX`
+sed "s|FORWARD_IPV4|# FORWARD_IPV4 removed; see /etc/sysctl.conf|g"
+ /etc/sysconfig/network > $newnet
+sed "s|DEFRAG_IPV4|# DEFRAG_IPV4 removed; see /etc/sysctl.conf|g"
+ $newnet > /etc/sysconfig/network
+rm -f $newnet
+
+
if [ -n "$MAGIC_SYSRQ" -a "$MAGIC_SYSRQ" != "no" ]; then
echo "# added by initscripts install on `date`" >> /etc/sysctl.conf
echo "kernel.sysrq = 1" >> /etc/sysctl.conf
@@ -155,6 +164,13 @@ if uname -m | grep -q sparc ; then
fi
fi
+newinit=`mktemp /etc/syconfig/init.XXXXXX`
+sed "s|MAGIC_SYSRQ|# MAGIC_SYSRQ removed; see /etc/sysctl.conf|g"
+ /etc/sysconfig/init > $newinit
+sed "s|STOP_A|# STOP_A removed; see /etc/sysctl.conf|g"
+ $newinit > /etc/sysconfig/init
+
+
%clean
rm -rf $RPM_BUILD_ROOT
@@ -228,6 +244,9 @@ rm -rf $RPM_BUILD_ROOT
%ghost %attr(0664,root,utmp) /var/run/utmp
%changelog
+* Tue Mar 7 2000 Bill Nottingham <notting@redhat.com>
+- rerun sysctl on network start (for restarts)
+
* Mon Feb 28 2000 Bill Nottingham <notting@redhat.com>
- don't read commented raid devices
diff --git a/rc.d/init.d/network b/rc.d/init.d/network
index 9f8a5b0e..6521f2c3 100755
--- a/rc.d/init.d/network
+++ b/rc.d/init.d/network
@@ -42,6 +42,8 @@ interfaces=`ls ifcfg* | egrep -v '(ifcfg-lo|:)' | \
# See how we were called.
case "$1" in
start)
+
+ action "Setting network parameters" sysctl -p /etc/sysctl.conf
action "Bringing up interface lo" ./ifup ifcfg-lo