aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2000-03-07 17:47:15 +0000
committerBill Nottingham <notting@redhat.com>2000-03-07 17:47:15 +0000
commitf5f63647d32dec8ba892a3b03cd9e4ef9a2c0217 (patch)
tree92b119a6fcf32b65ccc7f36296f8b3d442a224e4
parent443a3db6beec5077699ff0916cc98c67425c04a4 (diff)
downloadinitscripts-f5f63647d32dec8ba892a3b03cd9e4ef9a2c0217.tar
initscripts-f5f63647d32dec8ba892a3b03cd9e4ef9a2c0217.tar.gz
initscripts-f5f63647d32dec8ba892a3b03cd9e4ef9a2c0217.tar.bz2
initscripts-f5f63647d32dec8ba892a3b03cd9e4ef9a2c0217.tar.xz
initscripts-f5f63647d32dec8ba892a3b03cd9e4ef9a2c0217.zip
*** empty log message ***r4-98
-rw-r--r--ChangeLog3
-rw-r--r--initscripts.spec27
-rw-r--r--sysctl.conf1
-rw-r--r--sysctl.conf.sparc1
4 files changed, 13 insertions, 19 deletions
diff --git a/ChangeLog b/ChangeLog
index 54c718ad..01920f14 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,9 +6,6 @@
* initscripts.spec, rc.d/init.d/network:
handle sysctl upgrades better ; re-run sysctl on network start
- * sysctl.conf, sysctl.conf.sparc:
- add an extra newline
-
2000-02-24 Bill Nottingham <notting@redhat.com>
* sysconfig/network-scripts/ifup-post:
diff --git a/initscripts.spec b/initscripts.spec
index 476ca579..5edf9e18 100644
--- a/initscripts.spec
+++ b/initscripts.spec
@@ -139,41 +139,40 @@ fi
if [ -n "$FORWARD_IPV4" -a "$FORWARD_IPV4" != "no" -a "$FORWARD_IPV4" != "false" ]; then
echo "# added by initscripts install on `date`" >> /etc/sysctl.conf
echo "net.ipv4.ip_forward = 1" >> /etc/sysctl.conf
- echo >> /etc/syctl.conf
fi
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
- echo >> /etc/syctl.conf
fi
newnet=`mktemp /etc/sysconfig/network.XXXXXX`
-sed "s|FORWARD_IPV4|# FORWARD_IPV4 removed; see /etc/sysctl.conf|g" \
+if [ -n "$newnet" ]; then
+ 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" \
+ sed "s|DEFRAG_IPV4.*|# DEFRAG_IPV4 removed; see /etc/sysctl.conf|g" \
$newnet > /etc/sysconfig/network
-rm -f $newnet
-
+ rm -f $newnet
+fi
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
- echo >> /etc/syctl.conf
fi
if uname -m | grep -q sparc ; then
if [ -n "$STOP_A" -a "$STOP_A" != "no" ]; then
echo "# added by initscripts install on `date`" >> /etc/sysctl.conf
echo "kernel.stop-a = 1" >> /etc/sysctl.conf
- echo >> /etc/syctl.conf
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
-
+newinit=`mktemp /etc/sysconfig/init.XXXXXX`
+if [ -n "$newinit" ]; then
+ 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
+ rm -f $newinit
+fi
%clean
rm -rf $RPM_BUILD_ROOT
diff --git a/sysctl.conf b/sysctl.conf
index cde37117..59a86d44 100644
--- a/sysctl.conf
+++ b/sysctl.conf
@@ -6,4 +6,3 @@ net.ipv4.conf.all.rp_filter = 1
net.ipv4.ip_always_defrag = 0
# Disables the magic-sysrq key
kernel.sysrq = 0
-
diff --git a/sysctl.conf.sparc b/sysctl.conf.sparc
index 7e7de89a..c01a8d06 100644
--- a/sysctl.conf.sparc
+++ b/sysctl.conf.sparc
@@ -8,4 +8,3 @@ net.ipv4.ip_always_defrag = 0
kernel.sysrq = 0
# Disables stop-a on the sparc
kernel.stop-a = 0
-