rpms/dhcp/devel dhcp-3.0.2-dhclient-no_isc_blurb.patch, NONE, 1.1 dhcp-3.0.2-dhclient-script-restorecon.patch, NONE, 1.1
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Mon Apr 18 18:08:47 UTC 2005
Update of /cvs/dist/rpms/dhcp/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv8668
Added Files:
dhcp-3.0.2-dhclient-no_isc_blurb.patch
dhcp-3.0.2-dhclient-script-restorecon.patch
Log Message:
fix bugs 155143 and 153244; stop verbose ISC blurb log on error exit in -q mode
dhcp-3.0.2-dhclient-no_isc_blurb.patch:
client/dhclient.c | 5 ++++-
omapip/errwarn.c | 11 ++++++++++-
2 files changed, 14 insertions(+), 2 deletions(-)
--- NEW FILE dhcp-3.0.2-dhclient-no_isc_blurb.patch ---
--- dhcp-3.0.2/client/dhclient.c.no_isc_blurb 2005-04-18 13:21:08.509169000 -0400
+++ dhcp-3.0.2/client/dhclient.c 2005-04-18 13:49:27.574402000 -0400
@@ -34,7 +34,7 @@
static char ocopyright[] =
"$Id: dhclient.c,v 1.129.2.23 2004/11/24 17:39:14 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
-
+
#include "dhcpd.h"
#include "version.h"
@@ -81,6 +81,8 @@
void do_release(struct client_state *);
+extern int log_isc_blurb;
+
int main (argc, argv, envp)
int argc;
char **argv, **envp;
@@ -176,6 +178,7 @@
} else if (!strcmp (argv [i], "-q")) {
quiet = 1;
quiet_interface_discovery = 1;
+ log_isc_blurb = 0;
} else if (!strcmp (argv [i], "-s")) {
if (++i == argc)
usage ();
--- dhcp-3.0.2/omapip/errwarn.c.no_isc_blurb 2004-09-30 16:38:32.000000000 -0400
+++ dhcp-3.0.2/omapip/errwarn.c 2005-04-18 13:45:49.037158000 -0400
@@ -45,6 +45,8 @@
int log_perror = 1;
#endif
int log_priority;
+int log_isc_blurb=1;
+
void (*log_cleanup) (void);
#define CVT_BUF_MAX 1023
@@ -76,7 +78,9 @@
write (STDERR_FILENO, "\n", 1);
}
-#if !defined (NOMINUM)
+#if !defined(NOMINUM)
+ if ( log_isc_blurb )
+ {
log_error ("%s", "");
log_error ("If you did not get this software from ftp.isc.org, please");
log_error ("get the latest from ftp.isc.org and install that before");
@@ -94,7 +98,12 @@
log_error ("the README file.");
log_error ("%s", "");
log_error ("exiting.");
+ }else
+ {
+ log_error ("exiting.");
+ }
#endif
+
if (log_cleanup)
(*log_cleanup) ();
exit (1);
dhcp-3.0.2-dhclient-script-restorecon.patch:
linux | 22 +++++++++++++++-------
1 files changed, 15 insertions(+), 7 deletions(-)
--- NEW FILE dhcp-3.0.2-dhclient-script-restorecon.patch ---
--- dhcp-3.0.2/client/scripts/linux.restore_restorecon 2005-04-05 18:04:54.000000000 -0400
+++ dhcp-3.0.2/client/scripts/linux 2005-04-18 12:31:55.123246386 -0400
@@ -24,6 +24,7 @@
mv $1 $1.predhclient
fi
}
+
make_resolv_conf() {
if [ "${PEERDNS}" == "no" ]; then
return
@@ -50,6 +51,7 @@
echo nameserver $nameserver >> $rscf
done
change_resolv_conf $rscf
+ [ -x /sbin/restorecon ] && /sbin/restorecon /etc/resolv.conf >/dev/null 2>&1
rm -f $rscf
fi
}
@@ -234,6 +236,10 @@
make_resolv_conf
+ if [ -n "$new_host_name" ] && need_hostname; then
+ hostname $new_host_name
+ fi
+
if [ "${PEERNIS}" = no ]; then
:
elif [ -n "$new_nis_domain" ]; then
@@ -283,6 +289,7 @@
do
echo 'server '$s >> /etc/ntp.conf;
done
+ [ -x /sbin/restorecon ] && /sbin/restorecon /etc/ntp.conf >/dev/null 2>&1
if [ -e /etc/ntp/step-tickers ]; then
save_previous /etc/ntp/step-tickers
echo '' > /etc/ntp/step-tickers
@@ -290,6 +297,7 @@
do
echo $s >> /etc/ntp/step-tickers
done;
+ [ -x /sbin/restorecon ] && /sbin/restorecon /etc/ntp/step-tickers >/dev/null 2>&1
fi;
if [ -x /usr/bin/diff ] && /usr/bin/diff -q /etc/ntp.conf /etc/ntp.conf.predhclient >/dev/null 2>&1; then
: ;
@@ -297,10 +305,6 @@
/sbin/service ntpd condrestart >/dev/null 2>&1
fi;
fi
-
- if [ -n "$new_host_name" ] && need_hostname; then
- hostname $new_host_name
- fi
}
if [ x$new_broadcast_address != x ]; then
@@ -336,7 +340,7 @@
ifconfig $interface inet 0.0.0.0 netmask 0.0.0.0 \
broadcast 255.255.255.255 up
# Add route to make broadcast work. Do not omit netmask.
- /sbin/route replace default dev $interface && added_old_broadcast_route=1;
+ /sbin/ip route replace default dev $interface && added_old_broadcast_route=1;
else
ifconfig $interface 0 up
fi
@@ -360,18 +364,22 @@
if [ x$reason = xEXPIRE ] || [ x$reason = xFAIL ] || [ x$reason = xRELEASE ] \
|| [ x$reason = xSTOP ]; then
if [ -f /etc/resolv.conf.predhclient ]; then
- change_resolv_conf /etc/resolv.conf.predhclient
+ change_resolv_conf /etc/resolv.conf.predhclien
+ [ -x /sbin/restorecon ] && /sbin/restorecon /etc/resolv.conf >/dev/null 2>&1
rm -f /etc/resolv.conf.predhclient
fi
if [ -f /etc/ntp.conf.predhclient ]; then
/bin/mv -f /etc/ntp.conf.predhclient /etc/ntp.conf
+ [ -x /sbin/restorecon ] && /sbin/restorecon /etc/ntp.conf >/dev/null 2>&1
if [ -f /etc/ntp/step-tickers.predhclient ]; then
/bin/mv -f /etc/ntp/step-tickers.predhclient /etc/ntp/step-tickers;
+ [ -x /sbin/restorecon ] && /sbin/restorecon /etc/ntp/step-tickers >/dev/null 2>&1
fi
service ntpd condrestart >/dev/null 2>&1
fi
if [ -f /etc/yp.conf.predhclient ]; then
/bin/mv -f /etc/yp.conf.predhclient /etc/yp.conf
+ [ -x /sbin/restorecon ] && /sbin/restorecon /etc/yp.conf >/dev/null 2>&1
pkill -HUP ypbind
fi
if [ x$alias_ip_address != x ]; then
@@ -384,7 +392,7 @@
fi
if [ x$alias_ip_address != x ]; then
ifconfig $interface:0 inet $alias_ip_address $alias_subnet_arg
- /sbin/route replace ${alias_ip_address}/32 $interface:0
+ /sbin/ip route replace ${alias_ip_address}/32 $interface:0
fi
exit_with_hooks 0
fi
More information about the fedora-cvs-commits
mailing list