aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2004-07-30 20:48:25 +0000
committerBill Nottingham <notting@redhat.com>2004-07-30 20:48:25 +0000
commit48ee88bf3e13f6265d71af22a5542da22aaaa1c5 (patch)
tree4b8e08c59c025d990662b3fe488bb6e85ee285a0
parent9c17ad3d1c05a2b1503493e4fd2ec59b6681911a (diff)
downloadinitscripts-48ee88bf3e13f6265d71af22a5542da22aaaa1c5.tar
initscripts-48ee88bf3e13f6265d71af22a5542da22aaaa1c5.tar.gz
initscripts-48ee88bf3e13f6265d71af22a5542da22aaaa1c5.tar.bz2
initscripts-48ee88bf3e13f6265d71af22a5542da22aaaa1c5.tar.xz
initscripts-48ee88bf3e13f6265d71af22a5542da22aaaa1c5.zip
revert
-rw-r--r--initscripts.spec7
-rwxr-xr-xsysconfig/network-scripts/ifdown-post2
-rwxr-xr-xsysconfig/network-scripts/ifup-post2
-rw-r--r--sysconfig/network-scripts/network-functions36
4 files changed, 4 insertions, 43 deletions
diff --git a/initscripts.spec b/initscripts.spec
index 64ef3442..1d78d719 100644
--- a/initscripts.spec
+++ b/initscripts.spec
@@ -1,6 +1,6 @@
Summary: The inittab file and the /etc/init.d scripts.
Name: initscripts
-Version: 7.60
+Version: 7.59
License: GPL
Group: System Environment/Base
Release: 1
@@ -249,11 +249,6 @@ rm -rf $RPM_BUILD_ROOT
%ghost %attr(0664,root,utmp) /var/run/utmp
%changelog
-* Fri Jul 30 2004 Jason Vas Dias <jvdias@redhat.com> 7.60-1
-- for bug 125712:
-- added 'change_resolv_conf' function to network-functions ;
-- made ifup-post and if-down post invoke it to change resolv.conf
-
* Fri Jul 2 2004 Bill Nottingham <notting@redhat.com> 7.59-1
- set context on ICE directory after making it (#127099, <concert@europe.com>)
- don't mount GFS filesystems in rc.sysinit
diff --git a/sysconfig/network-scripts/ifdown-post b/sysconfig/network-scripts/ifdown-post
index b88e5e3b..6c244ca1 100755
--- a/sysconfig/network-scripts/ifdown-post
+++ b/sysconfig/network-scripts/ifdown-post
@@ -10,7 +10,7 @@ source_config
if [ "${DEVICETYPE}" = "ppp" -o "${DEVICETYPE}" = "ippp" ]; then
if [ -f /etc/resolv.conf.save ]; then
- change_resolv_conf /etc/resolv.conf.save
+ cat /etc/resolv.conf.save > /etc/resolv.conf
rm -f /etc/resolv.conf.save
fi
if [ -f /etc/ppp/peers/$DEVICE ] ; then
diff --git a/sysconfig/network-scripts/ifup-post b/sysconfig/network-scripts/ifup-post
index fc91b55c..401d1e8c 100755
--- a/sysconfig/network-scripts/ifup-post
+++ b/sysconfig/network-scripts/ifup-post
@@ -67,7 +67,7 @@ if [ "$PEERDNS" != "no" -o -n "$RESOLV_MODS" -a "$RESOLV_MODS" != "no" ]; then
# but set umask in case it doesn't exist!
oldumask=`umask`
umask 022
- change_resolv_conf $tr
+ cat $tr > /etc/resolv.conf
rm -f $tr
umask $oldumask
fi
diff --git a/sysconfig/network-scripts/network-functions b/sysconfig/network-scripts/network-functions
index 9b495b9a..7c34370c 100644
--- a/sysconfig/network-scripts/network-functions
+++ b/sysconfig/network-scripts/network-functions
@@ -219,10 +219,7 @@ set_hostname ()
hostname $1
if ! grep search /etc/resolv.conf >/dev/null 2>&1; then
domain=`echo $1 | sed 's/^[^\.]*\.//'`
- /bin/cp -fp /etc/resolv.conf /tmp/set_hostname_resolv.conf
- echo "search $domain" >> /tmp/set_hostname_resolv.conf
- change_resolv_conf /tmp/set_hostname_resolv.conf
- /bin/rm -f /tmp/set_hostname_resolv.conf
+ echo "search $domain" >> /etc/resolv.conf
fi
}
@@ -355,34 +352,3 @@ configure_ccwgroup_device ()
echo "$PORTNAME" > $SYSDIR/portname
[ -e $SYSDIR/online ] && echo 1 > $SYSDIR/online
}
-
-# Invoke this when /etc/resolv.conf has changed:
-# (see bugzilla #125712)
-change_resolv_conf ()
-{
- s='';
- if [ $# -gt 1 ]; then
- let n_args=$#;
- while [ $n_args -gt 0 ];
- do
- s="$s$1";
- shift;
- if [ $# -gt 0 ]; then
- s="$s\n";
- fi;
- let n_args=n_args-1;
- done;
- elif [ $# -eq 1 ]; then
- s=`/bin/cat $1`;
- fi;
- /bin/chmod +w /etc/resolv.conf
- (echo -e "$s" > /etc/resolv.conf;) >/dev/null 2>&1;
- /bin/chmod a-w /etc/resolv.conf
- r=$?
- if [ $r -eq 0 ]; then
- /usr/bin/logger -p local0.notice -t NET "$0 : updated /etc/resolv.conf";
- /sbin/service nscd condrestart >/dev/null 2>&1;
- return $?;
- fi;
- return $r;
-}