From 9788124e2ac5b4c692bd31024dae71d3d99d45cb429b91226253cfb9bd30b8ef Mon Sep 17 00:00:00 2001 From: Marius Tomaschewski Date: Fri, 29 Apr 2011 13:49:30 +0000 Subject: [PATCH] - Implemented optional ldap connect retry loop during the initial startup of the dhcp server in cases where the ldap server is not yet started. Set the ldap-init-retry option in dhcpd.conf to enable it (bnc#627617). Merged in the actual ldap patch. - Cleaned up init script error reporting, no -TERM for killproc. OBS-URL: https://build.opensuse.org/package/show/network:dhcp/dhcp?expand=0&rev=65 --- dhcp-4.2.1-P1-ldap-patch-mt01.diff.bz2 | 3 +++ dhcp-4.2.1-ldap-patch-mt01.diff.bz2 | 3 --- dhcp.changes | 9 +++++++++ dhcp.spec | 3 +-- rc.dhcpd | 8 +++++--- rc.dhcpd6 | 6 ++++-- rc.dhcrelay | 14 +++++--------- rc.dhcrelay6 | 14 +++++--------- 8 files changed, 32 insertions(+), 28 deletions(-) create mode 100644 dhcp-4.2.1-P1-ldap-patch-mt01.diff.bz2 delete mode 100644 dhcp-4.2.1-ldap-patch-mt01.diff.bz2 diff --git a/dhcp-4.2.1-P1-ldap-patch-mt01.diff.bz2 b/dhcp-4.2.1-P1-ldap-patch-mt01.diff.bz2 new file mode 100644 index 0000000..d7cb6ba --- /dev/null +++ b/dhcp-4.2.1-P1-ldap-patch-mt01.diff.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6f1458dc06686ad2c80111f09d1ffc61f0f7feecbd9e693bdc55904a35708608 +size 11461 diff --git a/dhcp-4.2.1-ldap-patch-mt01.diff.bz2 b/dhcp-4.2.1-ldap-patch-mt01.diff.bz2 deleted file mode 100644 index c4e4828..0000000 --- a/dhcp-4.2.1-ldap-patch-mt01.diff.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5d5a0f6d8570eda14268c48207f6df9c0360ddf2e91de50676e6e6d9a8df3d82 -size 10234 diff --git a/dhcp.changes b/dhcp.changes index 1e67e36..913940a 100644 --- a/dhcp.changes +++ b/dhcp.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Fri Apr 29 13:31:57 UTC 2011 - mt@suse.de + +- Implemented optional ldap connect retry loop during the initial + startup of the dhcp server in cases where the ldap server is not + yet started. Set the ldap-init-retry option in dhcpd.conf + to enable it (bnc#627617). Merged in the actual ldap patch. +- Cleaned up init script error reporting, no -TERM for killproc. + ------------------------------------------------------------------- Wed Apr 27 12:31:25 UTC 2011 - mt@suse.de diff --git a/dhcp.spec b/dhcp.spec index 5f0350e..5099e95 100644 --- a/dhcp.spec +++ b/dhcp.spec @@ -78,7 +78,7 @@ Patch15: contrib-lease-path.diff Patch20: dhcp-4.1.1-dhclient-exec-filedes.diff Patch21: dhcp-4.2.1-dhclient-send-hostname-rml.diff ## patch lives here: http://www.suse.de/~mt/git/dhcp-ldap.git/ -Patch30: dhcp-4.2.1-ldap-patch-mt01.diff.bz2 +Patch30: dhcp-4.2.1-P1-ldap-patch-mt01.diff.bz2 Patch40: dhcp-4.1.1-P1-lpf-bind-msg-fix.diff Patch41: dhcp-4.1.1-P1-relay-no-ip-on-interface.diff Patch44: dhcp-4.2.0-xen-checksum.patch @@ -372,7 +372,6 @@ if [ ${FIRST_ARG:-0} -gt 1 ]; then rm -f $tmpfile fi fi -exit 0 %preun server %stop_on_removal dhcpd diff --git a/rc.dhcpd b/rc.dhcpd index 3e109e0..5cdb21a 100644 --- a/rc.dhcpd +++ b/rc.dhcpd @@ -280,8 +280,10 @@ case "$1" in ret=$? fi - if [ $error -gt 0 -o ${ret:-0} -gt 0 ]; then - cat $STARTPROC_LOGFILE + if [ $error -gt 0 -o ${ret:-0} -gt 0 ]; then + ## be verbose + echo "" + echo -n " please see $STARTPROC_LOGFILE for details "; ## set status to failed rc_failed else @@ -297,7 +299,7 @@ case "$1" in ## Stop daemon with killproc(8) and if this fails ## set echo the echo return value. - killproc -p $CHROOT_PREFIX/$DAEMON_PIDFILE -TERM $DAEMON_BIN + killproc -p $CHROOT_PREFIX/$DAEMON_PIDFILE $DAEMON_BIN ret=$? if test -s $CHROOT_PREFIX/$DAEMON_PIDFILE; then kill $(<$CHROOT_PREFIX/$DAEMON_PIDFILE) 2>/dev/null diff --git a/rc.dhcpd6 b/rc.dhcpd6 index a6ebd7a..9c7a34e 100644 --- a/rc.dhcpd6 +++ b/rc.dhcpd6 @@ -285,7 +285,9 @@ case "$1" in fi if [ $error -gt 0 -o ${ret:-0} -gt 0 ]; then - cat $STARTPROC_LOGFILE + ## be verbose + echo "" + echo -n " please see $STARTPROC_LOGFILE for details " ## set status to failed rc_failed else @@ -301,7 +303,7 @@ case "$1" in ## Stop daemon with killproc(8) and if this fails ## set echo the echo return value. - killproc -p $CHROOT_PREFIX/$DAEMON_PIDFILE -TERM $DAEMON_BIN + killproc -p $CHROOT_PREFIX/$DAEMON_PIDFILE $DAEMON_BIN ret=$? if test -s $CHROOT_PREFIX/$DAEMON_PIDFILE; then kill $(<$CHROOT_PREFIX/$DAEMON_PIDFILE) 2>/dev/null diff --git a/rc.dhcrelay b/rc.dhcrelay index 01f0100..56fea3a 100644 --- a/rc.dhcrelay +++ b/rc.dhcrelay @@ -105,16 +105,12 @@ case "$1" in # already running to match LSB spec. test "$2" = "-v" && echo -en \ "\nexecuting '$DAEMON_BIN $DHCPv_OPT $DHCRELAY_OPTIONS $DHCRELAY_INTERFACES_ARGS $DHCRELAY_SERVERS'" - startproc -q -l $STARTPROC_LOGFILE -p $DAEMON_PIDFILE $DAEMON_BIN $DHCPv_OPT $DHCRELAY_OPTIONS $DHCRELAY_INTERFACES_ARGS $DHCRELAY_SERVERS + startproc -q -l $STARTPROC_LOGFILE -p $DAEMON_PIDFILE $DAEMON_BIN $DHCPv_OPT $DHCRELAY_OPTIONS $DHCRELAY_INTERFACES_ARGS $DHCRELAY_SERVERS &>/dev/null rc=$? if ! [ $rc -eq 0 ]; then - if [ $link = $base ] ; then - ## be quiet - cat $STARTPROC_LOGFILE - else - ## be verbose - echo -e -n " please see $STARTPROC_LOGFILE for details "; - fi + ## be verbose + echo "" + echo -n " please see $STARTPROC_LOGFILE for details " ## set status to failed rc_failed fi @@ -127,7 +123,7 @@ case "$1" in ## Stop daemon with killproc(8) and if this fails ## set echo the echo return value. - killproc -p $DAEMON_PIDFILE -TERM $DAEMON_BIN + killproc -p $DAEMON_PIDFILE $DAEMON_BIN # Remember status and be verbose rc_status -v diff --git a/rc.dhcrelay6 b/rc.dhcrelay6 index 7d6964e..c5701ee 100644 --- a/rc.dhcrelay6 +++ b/rc.dhcrelay6 @@ -113,16 +113,12 @@ case "$1" in # already running to match LSB spec. test "$2" = "-v" && echo -en \ "\nexecuting '$DAEMON_BIN $DHCPv_OPT $DHCRELAY6_OPTIONS $DHCRELAY6_LOWER_INTERFACES_ARGS $DHCRELAY6_UPPER_INTERFACES_ARGS'" - startproc -q -l $STARTPROC_LOGFILE -p $DAEMON_PIDFILE $DAEMON_BIN $DHCPv_OPT $DHCRELAY6_OPTIONS $DHCRELAY6_LOWER_INTERFACES_ARGS $DHCRELAY6_UPPER_INTERFACES_ARGS + startproc -q -l $STARTPROC_LOGFILE -p $DAEMON_PIDFILE $DAEMON_BIN $DHCPv_OPT $DHCRELAY6_OPTIONS $DHCRELAY6_LOWER_INTERFACES_ARGS $DHCRELAY6_UPPER_INTERFACES_ARGS &>/dev/null rc=$? if ! [ $rc -eq 0 ]; then - if [ $link = $base ] ; then - ## be quiet - cat $STARTPROC_LOGFILE - else - ## be verbose - echo -e -n " please see $STARTPROC_LOGFILE for details "; - fi + ## be verbose + echo "" + echo -n " please see $STARTPROC_LOGFILE for details "; ## set status to failed rc_failed fi @@ -135,7 +131,7 @@ case "$1" in ## Stop daemon with killproc(8) and if this fails ## set echo the echo return value. - killproc -p $DAEMON_PIDFILE -TERM $DAEMON_BIN + killproc -p $DAEMON_PIDFILE $DAEMON_BIN # Remember status and be verbose rc_status -v