Date: Mon, 3 Mar 2008 10:30:03 GMT From: Justin Head <ports@encarnate.com> To: freebsd-ports-bugs@FreeBSD.org Subject: Re: ports/121050: New port: sysutils/heartbeat2 Linux High-Availability Daemon Message-ID: <200803031030.m23AU3eh018740@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR ports/121050; it has been noted by GNATS. From: Justin Head <ports@encarnate.com> To: bug-followup@FreeBSD.org, ports@encarnate.com Cc: Subject: Re: ports/121050: New port: sysutils/heartbeat2 Linux High-Availability Daemon Date: Mon, 03 Mar 2008 04:24:41 -0600 Found a nasty bug that would remove your active cluster config if you deinstalled and then reinstalled. This fixes it plus a small plist change. --- diffs begins here --- # diff -ruN Makefile.orig Makefile --- Makefile.orig 2007-12-26 22:42:39.000000000 -0600 +++ Makefile 2008-03-03 04:01:08.000000000 -0600 @@ -46,6 +46,7 @@ --disable-dopd SUB_FILES= pkg-install pkg-message +SUB_LIST= BATCH=${BATCH} PKGDEINSTALL= ${PKGINSTALL} @@ -58,6 +59,10 @@ .include <bsd.port.pre.mk> +.if !defined(BATCH) +BATCH=NO +.endif + .if defined(WITH_MGMT) BUILD_DEPENDS+= swig:${PORTSDIR}/devel/swig11 RUN_DEPENDS+= py-gtk2:${PORTSDIR}/x11-toolkits/py-gtk2 @@ -91,7 +96,7 @@ .endif pre-install: - @LOCALBASE=${LOCALBASE} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL + @${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL post-install: @if [ ! -f ${PREFIX}/etc/ha.d/authkeys ]; then \ @@ -132,6 +137,6 @@ @${CAT} ${PKGMESSAGE} post-deinstall: - @LOCALBASE=${LOCALBASE} ${SH} ${PKGINSTALL} ${PKGNAME} DEINSTALL + @${SH} ${PKGINSTALL} ${PKGNAME} DEINSTALL .include <bsd.port.post.mk> # diff -ruN files/pkg-install.in.orig files/pkg-install.in --- files/pkg-install.in.orig 2007-12-09 04:57:21.000000000 -0600 +++ files/pkg-install.in 2008-03-03 04:10:46.000000000 -0600 @@ -5,7 +5,7 @@ UID=275 GID=${UID} -LOCALBASE=${LOCALBASE:-%%LOCALBASE%%} +BATCH=${BATCH:-%%BATCH%%} case $2 in @@ -96,15 +96,35 @@ # Cleanup /var environment echo -n "Cleaning up /var environment... " - test -d /var/run/heartbeat && \ - rm -r /var/run/heartbeat - test -d /var/lib/heartbeat && \ - rm -r /var/lib/heartbeat - test -f /var/lock/subsys/heartbeat && \ - rm /var/lock/subsys/heartbeat - test -f /var/run/heartbeat.pid && \ - rm /var/run/heartbeat.pid - echo "DONE" + + if [ "$BATCH" = "NO" ]; then + echo "" + default="n" + read -p " Remove runtime files (cluster config)? [yn]: " answer + + case "$answer" in + [Yy]*) answer=y ;; + [Nn]*) answer=n ;; + *) answer=n ;; + esac + + if [ "$answer" = "y" ]; then + echo -n " Removing runtime files... " + test -d /var/run/heartbeat && \ + rm -r /var/run/heartbeat + test -d /var/lib/heartbeat && \ + rm -r /var/lib/heartbeat + test -f /var/lock/subsys/heartbeat && \ + rm /var/lock/subsys/heartbeat + test -f /var/run/heartbeat.pid && \ + rm /var/run/heartbeat.pid + echo "DONE" + else + echo "Preserving runtime files... DONE" + fi + else + echo "NA" + fi echo -e "\n\n" # diff -ruN pkg-plist.orig pkg-plist --- pkg-plist.orig 2007-12-26 22:23:53.000000000 -0600 +++ pkg-plist 2008-03-03 04:08:53.000000000 -0600 @@ -444,6 +444,9 @@ lib/stonith/plugins/stonith2/apcmaster.a lib/stonith/plugins/stonith2/apcmaster.la lib/stonith/plugins/stonith2/apcmaster.so +lib/stonith/plugins/stonith2/apcmastersnmp.a +lib/stonith/plugins/stonith2/apcmastersnmp.la +lib/stonith/plugins/stonith2/apcmastersnmp.so lib/stonith/plugins/stonith2/apcsmart.a lib/stonith/plugins/stonith2/apcsmart.la lib/stonith/plugins/stonith2/apcsmart.so @@ -453,6 +456,9 @@ lib/stonith/plugins/stonith2/cyclades.a lib/stonith/plugins/stonith2/cyclades.la lib/stonith/plugins/stonith2/cyclades.so +lib/stonith/plugins/stonith2/drac3.a +lib/stonith/plugins/stonith2/drac3.la +lib/stonith/plugins/stonith2/drac3.so lib/stonith/plugins/stonith2/external.a lib/stonith/plugins/stonith2/external.la lib/stonith/plugins/stonith2/external.so
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200803031030.m23AU3eh018740>