rpms/dhcp/devel dhcp-3.0.3-dhclient-script-ypbind-hup-ok.patch, NONE, 1.1
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Sat Jul 30 00:48:00 UTC 2005
Author: jvdias
Update of /cvs/dist/rpms/dhcp/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv24539
Added Files:
dhcp-3.0.3-dhclient-script-ypbind-hup-ok.patch
Log Message:
improve dhclient-script ypbind reload
dhcp-3.0.3-dhclient-script-ypbind-hup-ok.patch:
linux | 17 ++++++++++++-----
1 files changed, 12 insertions(+), 5 deletions(-)
--- NEW FILE dhcp-3.0.3-dhclient-script-ypbind-hup-ok.patch ---
--- dhcp-3.0.3/client/scripts/linux.ypbind_hup_ok 2005-07-29 18:17:32.000000000 -0400
+++ dhcp-3.0.3/client/scripts/linux 2005-07-29 20:21:06.000000000 -0400
@@ -283,8 +283,8 @@
if [ "$level" = "unknown" ]; then
level=1;
fi
- if [[ "$level" = [0-6] ]] && ! pkill -HUP ypbind && [ $contents -gt 0 ] && chkconfig --level=$level ypbind; then
- service ypbind start >/dev/null 2>&1;
+ if [ $contents -gt 0 ] && [[ "$level" = [0-6] ]] && /sbin/chkconfig --level=$level ypbind && [ -r /var/run/ypbind.pid ] && yppid=`cat /var/run/ypbind.pid` && [ -d /proc/${yppid} ] && [ "`if [ -x /sbin/busybox ]; then /sbin/busybox readlink /proc/${yppid}/exe; else echo /sbin/ypbind; fi`" = "/sbin/ypbind" ]; then
+ kill -HUP $yppid;
fi
elif [ -n "$new_nis_servers" ]; then
save_previous /etc/yp.conf
@@ -299,8 +299,8 @@
if [ "$level" = "unknown" ]; then
level=1;
fi
- if [[ "$level" = [0-6] ]] && ! pkill -HUP ypbind && [ $contents -gt 0 ] && chkconfig --level=$level ypbind; then
- service ypbind start >/dev/null 2>&1;
+ if [ $contents -gt 0 ] && [[ "$level" = [0-6] ]] && /sbin/chkconfig --level=$level ypbind && [ -r /var/run/ypbind.pid ] && yppid=`cat /var/run/ypbind.pid` && [ -d /proc/${yppid} ] && [ "`if [ -x /sbin/busybox ]; then /sbin/busybox readlink /proc/${yppid}/exe; else echo /sbin/ypbind; fi`" = "/sbin/ypbind" ] ; then
+ kill -HUP $yppid;
fi
fi
fi
@@ -413,7 +413,14 @@
if [ -f /etc/yp.conf.predhclient ]; then
/bin/rm -f /etc/yp.conf
/bin/mv -f /etc/yp.conf.predhclient /etc/yp.conf
- pkill -HUP ypbind
+ level=`/sbin/runlevel`
+ level=${level##*\ }
+ if [ "$level" = "unknown" ]; then
+ level=1;
+ fi
+ if [[ "$level" = [0-6] ]] && /sbin/chkconfig --level=$level ypbind && [ -r /var/run/ypbind.pid ] && yppid=`cat /var/run/ypbind.pid` && [ -d /proc/${yppid} ] && [ "`if [ -x /sbin/busybox ]; then /sbin/busybox readlink /proc/${yppid}/exe; else echo /sbin/ypbind; fi`" = "/sbin/ypbind" ] ; then
+ kill -HUP $yppid;
+ fi
fi
if [ x$alias_ip_address != x ]; then
# Turn off alias interface.
More information about the fedora-cvs-commits
mailing list