aboutsummaryrefslogtreecommitdiff
path: root/sysutils/heartbeat/files
diff options
context:
space:
mode:
authorBoris Samorodov <bsam@FreeBSD.org>2009-07-29 09:13:31 +0000
committerBoris Samorodov <bsam@FreeBSD.org>2009-07-29 09:13:31 +0000
commit802b8d8147df4a8035a32c2bbb43c16fc6a75308 (patch)
tree189acddec0c417480899d1635ef0d8ecd8c1bdc2 /sysutils/heartbeat/files
parent6bf1805d40e00d782da6e4604b3d203b96d3e05d (diff)
downloadports-802b8d8147df4a8035a32c2bbb43c16fc6a75308.tar.gz
ports-802b8d8147df4a8035a32c2bbb43c16fc6a75308.zip
Notes
Diffstat (limited to 'sysutils/heartbeat/files')
-rw-r--r--sysutils/heartbeat/files/patch-configure20
-rw-r--r--sysutils/heartbeat/files/patch-configure.in88
-rw-r--r--sysutils/heartbeat/files/patch-heartbeat-init.d-heartbeat.in39
-rw-r--r--sysutils/heartbeat/files/patch-heartbeat-resource.d-BSDService.in95
-rw-r--r--sysutils/heartbeat/files/patch-heartbeat-resource.d-Makefile.in37
-rw-r--r--sysutils/heartbeat/files/patch-heartbeat_resource.d_IPaddr.in54
-rw-r--r--sysutils/heartbeat/files/patch-ldirectord-init.d-ldirectord11
-rw-r--r--sysutils/heartbeat/files/patch-ldirectord-ldirectord.in11
-rw-r--r--sysutils/heartbeat/files/pkg-install.in252
-rw-r--r--sysutils/heartbeat/files/pkg-message.in25
10 files changed, 286 insertions, 346 deletions
diff --git a/sysutils/heartbeat/files/patch-configure b/sysutils/heartbeat/files/patch-configure
deleted file mode 100644
index 647237f31ff3..000000000000
--- a/sysutils/heartbeat/files/patch-configure
+++ /dev/null
@@ -1,20 +0,0 @@
---- configure.orig 2009-01-20 22:45:46.000000000 +0100
-+++ configure 2009-01-20 22:48:19.000000000 +0100
-@@ -36536,6 +36536,9 @@
-
-
-
-+ac_config_files+="heartbeat/resource.d/BSDService"
-+
-+
- cat >confcache <<\_ACEOF
- # This file is a shell script that caches the results of configure
- # tests run on this system so they can be shared between configure
-@@ -37283,6 +37286,7 @@
- "heartbeat/resource.d/Makefile" ) CONFIG_FILES="$CONFIG_FILES heartbeat/resource.d/Makefile" ;;
- "heartbeat/resource.d/apache" ) CONFIG_FILES="$CONFIG_FILES heartbeat/resource.d/apache" ;;
- "heartbeat/resource.d/AudibleAlarm" ) CONFIG_FILES="$CONFIG_FILES heartbeat/resource.d/AudibleAlarm" ;;
-+ "heartbeat/resource.d/BSDService" ) CONFIG_FILES="$CONFIG_FILES heartbeat/resource.d/BSDService" ;;
- "heartbeat/resource.d/Delay" ) CONFIG_FILES="$CONFIG_FILES heartbeat/resource.d/Delay" ;;
- "heartbeat/resource.d/db2" ) CONFIG_FILES="$CONFIG_FILES heartbeat/resource.d/db2" ;;
- "heartbeat/resource.d/Filesystem" ) CONFIG_FILES="$CONFIG_FILES heartbeat/resource.d/Filesystem" ;;
diff --git a/sysutils/heartbeat/files/patch-configure.in b/sysutils/heartbeat/files/patch-configure.in
new file mode 100644
index 000000000000..373d5e7bb8ae
--- /dev/null
+++ b/sysutils/heartbeat/files/patch-configure.in
@@ -0,0 +1,88 @@
+--- configure.in.orig 2008-08-18 07:32:19.000000000 -0500
++++ configure.in 2008-10-11 22:56:48.000000000 -0500
+@@ -65,6 +65,13 @@
+
+ pf_argv_set=""
+ case "$host_os" in
++*freebsd*)
++ LIBS="-L/usr/local/lib"
++ CPPFLAGS="$CPPFLAGS -I/usr/local/include"
++ INIT_EXT=""
++ REBOOT_OPTIONS="-d"
++ POWEROFF_OPTIONS="-p"
++ ;;
+ *bsd*) LIBS="-L/usr/local/lib"
+ CPPFLAGS="$CPPFLAGS -I/usr/local/include"
+ INIT_EXT=".sh"
+@@ -224,7 +231,7 @@
+ oldincludedir=`var "$oldincludedir" "$exec_prefix/include"`
+ infodir=`var "$infodir" "$prefix/info"`
+ mandir=`var "$mandir" "$exec_prefix/man"`
+-docdir=${datadir}/doc/${HB_PKG}-${VERSION}
++docdir=${datadir}/doc/heartbeat
+ libdir=`var "$libdir" "$exec_prefix/lib"`
+ libexecdir=`var "$libexecdir" "$exec_prefix/libexec"`
+ noarchlibdir=`var "$noarchlibdir" "$prefix/lib"`
+@@ -237,6 +244,7 @@
+ dnl Always tries to set the compiler to ANSI C via options (AM)
+ dnl Can force other with environment variable "CC".
+ AC_PROG_CC
++AM_PROG_CC_C_O
+ AC_PROG_CC_STDC
+
+ dnl ************************************************************************
+@@ -542,7 +550,7 @@
+ AC_PATH_PROGS(MAILCMD, mail, mailx)
+ AC_SUBST(MAILCMD)
+ AC_DEFINE_UNQUOTED(IFCONFIG, "$IFCONFIG", path to the ifconfig command)
+-AC_PATH_PROGS(LIBNETCONFIG, libnet-config)
++AC_PATH_PROGS(LIBNETCONFIG, libnet113-config)
+ AC_PATH_PROGS(GETENT, getent)
+ AC_PATH_PROGS(IP2UTIL, ip, /sbin/ip)
+ AC_PATH_PROGS(XML2CONFIG, xml2-config)
+@@ -725,13 +733,13 @@
+ AC_MSG_RESULT(using old version of API)
+ dnl The old version of the API REQUIRES $LIBNETCONFIG
+ dnl so we can only deal with new API unless we have it.
+- AC_CHECK_LIB(net, libnet_get_hwaddr, [],
++ AC_CHECK_LIB(net-1, libnet_get_hwaddr, [],
+ [FatalMissingThing "libnet" "You need libnet to continue." \
+ "You can get libnet from http://www.packetfactory.net/libnet" \
+ "Note that some RPMs split libnet up into libnet and libnet-devel." \
+ "In this case you have to install libnet-devel"])
+ LIBNETDEFINES=""
+- LIBNETLIBS=" -lnet"
++ LIBNETLIBS=" -lnet-1"
+ if test "$ac_cv_lib_nsl_t_open" = yes; then
+ LIBNETLIBS="-lnsl $LIBNETLIBS"
+ fi
+@@ -739,7 +747,7 @@
+ LIBNETLIBS="-lsocket $LIBNETLIBS"
+ fi
+
+- libnet=net
++ libnet=net-1
+ else
+ LIBNETDEFINES="`$LIBNETCONFIG --defines` `$LIBNETCONFIG --cflags`";
+ LIBNETLIBS="`$LIBNETCONFIG --libs`";
+@@ -2393,13 +2401,13 @@
+ dnl Note: reduce LIBS; in particular, ltdl can cause confusion.
+ dnl Possibly better: move 'LIBS="$LIBS -lltdl"' from above to beyond here.
+ dnl
+-AC_MSG_CHECKING(for getpid() consistency in multi-process/threads program)
+-ac_save_LIBS=$LIBS
+-LIBS="-lpthread"
+-AC_TRY_RUN(`cat $srcdir/config/pidtest.c`,
+-AC_MSG_RESULT(ok),
+-[AC_MSG_RESULT(fail); AC_DEFINE(GETPID_INCONSISTENT, 1 , [pid inconsistent])],)
+-LIBS=$ac_save_LIBS
++dnl AC_MSG_CHECKING(for getpid() consistency in multi-process/threads program)
++dnl ac_save_LIBS=$LIBS
++dnl LIBS="-lpthread"
++dnl AC_TRY_RUN(`cat $srcdir/config/pidtest.c`,
++dnl AC_MSG_RESULT(ok),
++dnl [AC_MSG_RESULT(fail); AC_DEFINE(GETPID_INCONSISTENT, 1 , [pid inconsistent])],)
++dnl LIBS=$ac_save_LIBS
+
+ dnl check byte order
+ AC_MSG_CHECKING(for byteorder)
diff --git a/sysutils/heartbeat/files/patch-heartbeat-init.d-heartbeat.in b/sysutils/heartbeat/files/patch-heartbeat-init.d-heartbeat.in
new file mode 100644
index 000000000000..d2d9ac5ebb2d
--- /dev/null
+++ b/sysutils/heartbeat/files/patch-heartbeat-init.d-heartbeat.in
@@ -0,0 +1,39 @@
+--- heartbeat/init.d/heartbeat.in.orig 2008-08-18 07:32:19.000000000 -0500
++++ heartbeat/init.d/heartbeat.in 2008-10-16 02:49:27.000000000 -0500
+@@ -45,6 +45,27 @@
+ ### END INIT INFO
+
+
++# FreeBSD
++# PROVIDE: heartbeat
++# REQUIRE: LOGIN
++# KEYWORD: shutdown
++
++# Add the following line to /etc/rc.conf to enable heartbeat:
++# heartbeat_enable="YES"
++
++. /etc/rc.subr
++name="heartbeat"
++rcvar='set_rcvar'
++load_rc_config $name
++: ${heartbeat_enable="NO"}
++
++if ! checkyesno "heartbeat_enable"; then
++ exit 0
++fi
++
++set `echo $1 | sed s/fast//`
++
++
+ HA_DIR=@sysconfdir@/ha.d; export HA_DIR
+ CONFIG=$HA_DIR/ha.cf
+ . $HA_DIR/shellfuncs
+@@ -161,7 +182,7 @@
+ fi
+
+
+- $HA_BIN/ha_logd -d >/dev/null 2>&1
++ $HA_BIN/ha_logd -d -c $HA_DIR/logd.cf >/dev/null 2>&1
+ if
+ [ $? -ne 0 ]
+ then
diff --git a/sysutils/heartbeat/files/patch-heartbeat-resource.d-BSDService.in b/sysutils/heartbeat/files/patch-heartbeat-resource.d-BSDService.in
deleted file mode 100644
index 84c2b5b29652..000000000000
--- a/sysutils/heartbeat/files/patch-heartbeat-resource.d-BSDService.in
+++ /dev/null
@@ -1,95 +0,0 @@
---- heartbeat/resource.d/BSDService.in.orig 2009-01-16 21:21:34.000000000 +0100
-+++ heartbeat/resource.d/BSDService.in 2009-01-16 21:21:11.000000000 +0100
-@@ -0,0 +1,92 @@
-+#!/bin/sh
-+#
-+# Created by Piotr Rybicki (meritus@innervision.pl) for BSD community
-+#
-+# This script can be used do start/stop FreeBSD's
-+# /usr/local/etc/rc.d/* services.
-+#
-+# One MUST NOT enable service (in /etc/rc.conf
-+# there cannot be SERVICE_enable"YES" line)
-+# Although other params for service are welcomed
-+#
-+# Service is started by 'onestart' parameter internally
-+#
-+# usage: $0 {start|stop|status}
-+#
-+# An example usage in /usr/local/etc/ha.d/haresources:
-+# node1 10.0.0.170 BSDService::mysql-server
-+#
-+usage() {
-+ cat <<-!
-+usage: $0 SERVICE {start|stop|status}";
-+!
-+ exit 1
-+}
-+
-+. /usr/local/etc/ha.d/shellfuncs
-+RCD=/usr/local/etc/rc.d
-+#VARLIB=/var/lib/heartbeat
-+#VLFILE=$VARLIB/rsctmp/Delay
-+
-+BSDService_Status() {
-+ if [ ! -f $RCD/$1 ]
-+ then
-+ echo "There is no $RCD/$1 script!. Fatal"
-+ fi
-+
-+ $RCD/$1 onestatus 2>&1 1>/dev/null
-+
-+ if [ $? -eq 0 ]
-+ then
-+ if [ $2 = 'verbose' ]
-+ then
-+ echo "Service $1 is running OK"
-+ fi
-+ return 0
-+ else
-+ if [ $2 = 'verbose' ]
-+ then
-+ echo "Service $1 is NOT running"
-+ fi
-+ return 1
-+ fi
-+}
-+
-+BSDService_Start() {
-+ BSDService_Status $1 noverbose
-+ if [ $? -eq 0 ]
-+ then
-+ echo "Service $1 already running"
-+ return 0
-+ else
-+ $RCD/$1 onestart
-+ return $?
-+ fi
-+}
-+
-+BSDService_Stop() {
-+ BSDService_Status $1 noverbose
-+ if [ $? -eq 0 ]
-+ then
-+ $RCD/$1 onestop
-+ return $?
-+ else
-+ echo "Service $1 already stopped"
-+ return 0
-+ fi
-+}
-+
-+if [ $# -ne 2 ]
-+then
-+ usage; exit 1;
-+fi
-+
-+case $2 in
-+ start) BSDService_Start $1 ;;
-+ stop) BSDService_Stop $1 ;;
-+ status) BSDService_Status $1 verbose ;;
-+ *) usage
-+ exit 1;;
-+esac
-+exit $?
-+
diff --git a/sysutils/heartbeat/files/patch-heartbeat-resource.d-Makefile.in b/sysutils/heartbeat/files/patch-heartbeat-resource.d-Makefile.in
deleted file mode 100644
index dd9c06993157..000000000000
--- a/sysutils/heartbeat/files/patch-heartbeat-resource.d-Makefile.in
+++ /dev/null
@@ -1,37 +0,0 @@
---- heartbeat/resource.d/Makefile.in.orig 2009-01-16 22:05:29.000000000 +0100
-+++ heartbeat/resource.d/Makefile.in 2009-01-16 22:07:37.000000000 +0100
-@@ -47,7 +47,7 @@
- $(srcdir)/Makefile.in $(srcdir)/OCF.in $(srcdir)/Raid1.in \
- $(srcdir)/SendArp.in $(srcdir)/ServeRAID.in $(srcdir)/WAS.in \
- $(srcdir)/WinPopup.in $(srcdir)/Xinetd.in $(srcdir)/apache.in \
-- $(srcdir)/db2.in $(srcdir)/portblock.in
-+ $(srcdir)/db2.in $(srcdir)/portblock.in $(srcdir)/BSDService.in
- ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
- am__aclocal_m4_deps = $(top_srcdir)/configure.in
- am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
-@@ -58,7 +58,7 @@
- CONFIG_CLEAN_FILES = apache AudibleAlarm Delay db2 Filesystem ICP \
- IPaddr IPaddr2 IPsrcaddr LinuxSCSI LVM LVSSyncDaemonSwap \
- MailTo OCF portblock Raid1 ServeRAID SendArp WAS WinPopup \
-- Xinetd
-+ Xinetd BSDService
- am__installdirs = "$(DESTDIR)$(halibdir)" "$(DESTDIR)$(harddir)"
- halibPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
- PROGRAMS = $(halib_PROGRAMS)
-@@ -357,6 +357,7 @@
- hard_SCRIPTS = \
- apache \
- AudibleAlarm \
-+ BSDService \
- db2 \
- Delay \
- Filesystem \
-@@ -414,6 +415,8 @@
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
- AudibleAlarm: $(top_builddir)/config.status $(srcdir)/AudibleAlarm.in
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
-+BSDService: $(top_builddir)/config.status $(srcdir)/BSDService.in
-+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
- Delay: $(top_builddir)/config.status $(srcdir)/Delay.in
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
- db2: $(top_builddir)/config.status $(srcdir)/db2.in
diff --git a/sysutils/heartbeat/files/patch-heartbeat_resource.d_IPaddr.in b/sysutils/heartbeat/files/patch-heartbeat_resource.d_IPaddr.in
deleted file mode 100644
index a9a8336451dd..000000000000
--- a/sysutils/heartbeat/files/patch-heartbeat_resource.d_IPaddr.in
+++ /dev/null
@@ -1,54 +0,0 @@
---- heartbeat/resource.d/IPaddr.in.orig 2009-01-16 21:01:12.000000000 +0100
-+++ heartbeat/resource.d/IPaddr.in 2009-01-16 21:13:44.000000000 +0100
-@@ -79,6 +79,23 @@
- return 1
- }
-
-+find_interface_bsd() {
-+
-+ ipaddr="$1";
-+
-+ for ifname in `$IFCONFIG -l`
-+ do
-+# echo "IFNAME:$ifname"
-+ $IFCONFIG $ifname | grep "inet.*[: ]$ipaddr " >/dev/null 2>&1
-+ if [ $? -eq 0 ]
-+ then
-+ echo $ifname
-+ return 0
-+ fi
-+ done
-+ return 1
-+}
-+
- #
- # Find out which alias serves the given IP address
- # The argument is an IP address, and its output
-@@ -131,6 +148,9 @@
- SunOS)
- IF=`find_interface_solaris $BASEIP`
- ;;
-+ BSD)
-+ IF=`find_interface_bsd $BASEIP`
-+ ;;
- *)
- IF=`find_interface_generic $BASEIP`
- ;;
-@@ -253,6 +273,7 @@
- ;;
-
- *BSD)
-+ echo "ipaddr: $ipaddr, iface: $iface, ifinfo: $ifinfo"
- CMD="$IFCONFIG $iface inet $ipaddr netmask 255.255.255.255 alias"
- ;;
- *)
-@@ -461,6 +482,9 @@
- SunOS)
- j=1
- ;;
-+ *BSD)
-+ j=1
-+ ;;
- *)
- j=0
- TRYADRCNT=`ls "${NICBASE}:"* | wc -l | tr -d ' ' 2>/dev/null`
diff --git a/sysutils/heartbeat/files/patch-ldirectord-init.d-ldirectord b/sysutils/heartbeat/files/patch-ldirectord-init.d-ldirectord
deleted file mode 100644
index fa699c652b52..000000000000
--- a/sysutils/heartbeat/files/patch-ldirectord-init.d-ldirectord
+++ /dev/null
@@ -1,11 +0,0 @@
---- ldirectord/init.d/ldirectord.orig
-+++ ldirectord/init.d/ldirectord
-@@ -22,7 +22,7 @@
- then
- . /etc/rc.d/init.d/functions
- else
-- function action {
-+ action() {
- echo -n "$1... "
- shift
- $@
diff --git a/sysutils/heartbeat/files/patch-ldirectord-ldirectord.in b/sysutils/heartbeat/files/patch-ldirectord-ldirectord.in
new file mode 100644
index 000000000000..50f41f3b8933
--- /dev/null
+++ b/sysutils/heartbeat/files/patch-ldirectord-ldirectord.in
@@ -0,0 +1,11 @@
+--- ldirectord/ldirectord.in.orig 2007-08-01 21:06:54.000000000 -0500
++++ ldirectord/ldirectord.in 2007-12-18 00:15:04.000000000 -0600
+@@ -674,7 +674,7 @@
+
+ # main code
+ if ($opt_h) {
+- exec_wrapper("/usr/bin/perldoc -U $LDIRECTORD");
++ exec_wrapper("@bindir@/perldoc -U $LDIRECTORD");
+ &ld_exit(127, "Exec failed");
+ }
+ if ($opt_v) {
diff --git a/sysutils/heartbeat/files/pkg-install.in b/sysutils/heartbeat/files/pkg-install.in
index a125513bfc8e..e69117e84a9d 100644
--- a/sysutils/heartbeat/files/pkg-install.in
+++ b/sysutils/heartbeat/files/pkg-install.in
@@ -1,138 +1,132 @@
-#! /bin/sh
-
-ask() {
- local question default answer
-
- question=$1
- default=$2
- # pkg_add fails anyhow, if we do not create the user/group
- if [ "x${BATCH}" = xno ]; then
- read -p "${question} [${default}]? " answer
- fi
- if [ "x${answer}" = x ]; then
- answer=${default}
- fi
- echo ${answer}
-}
-
-yesno() {
- local dflt question answer
-
- question=$1
- dflt=$2
- while :; do
- answer=$(ask "${question}" "${dflt}")
- case "${answer}" in
- [Yy]*) return 0;;
- [Nn]*) return 1;;
- esac
- echo "Please answer yes or no."
- done
-}
-
-make_account() {
- local u g uid gid
-
- u=$1
- g=$2
- uid=$3
- gid=$4
-
- if pw group show "${g}" >/dev/null 2>&1; then
- echo "You already have a group \"${g}\", so I will use it."
- else
- echo "You need a group \"${g}\"."
- if yesno "Would you like me to create it" y; then
- pw groupadd ${g} -g ${gid} || exit
- echo "Done."
+#!/bin/sh
+
+USER=hacluster
+GROUP=haclient
+UID=275
+GID=${UID}
+
+BATCH=${BATCH:-%%BATCH%%}
+
+case $2 in
+
+PRE-INSTALL)
+
+ echo -e "\n\n"
+
+ # Create account
+ echo -n "Creating heartbeat user group... "
+ if pw group show "${GROUP}" >/dev/null 2>&1; then
+ echo "Group \"${GROUP}\" already exists."
else
- echo "Please create it manually, and try again."
- exit 1
+ if pw groupadd ${GROUP} -g ${GID}; then
+ echo "Added group \"${GROUP}\"."
+ else
+ echo "Adding group \"${GROUP}\" failed..."
+ exit 1
+ fi
fi
- fi
-
- if pw user show "${u}" >/dev/null 2>&1; then
- echo "You already have a user \"${u}\", so I will use it."
- else
- echo "You need a user \"${u}\"."
- if yesno "Would you like me to create it" y; then
- pw useradd ${u} -u ${uid} -g ${g} -h - -d /nonexistant \
- -s /sbin/nologin -c "Heartbeat cluster user" || exit
- echo "Done."
+
+ echo -n "Creating heartbeat user id... "
+ if pw user show "${USER}" >/dev/null 2>&1; then
+ echo "User \"${USER}\" already exists."
else
- echo "Please create it, and try again."
- exit 1
+ if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \
+ -d /nonexistent -s /sbin/nologin -c "Heartbeat Daemon"
+ then
+ echo "Added user \"${USER}\"."
+ else
+ echo "Adding user \"${USER}\" failed..."
+ exit 1
+ fi
fi
- fi
-}
-
-delete_account() {
- local u g
-
- u=$1
- g=$2
- if yesno "Do you want me to remove group \"${g}\"" y; then
- echo "Removing group \"${g}\""
- pw groupdel -n ${g}
- echo "Done."
- fi
- if yesno "Do you want me to remove user \"${u}\"" y; then
- echo "Removing user \"${u}\""
- pw userdel -n ${u}
- echo "Done."
- fi
-}
-case $2 in
-PRE-INSTALL)
- echo ""
- user=hacluster
- group=haclient
- uid=275
- gid=275
- make_account ${user} ${group} $uid $gid
-
- echo "Adding empty dirs and pid file."
- test -d /var/lib/heartbeat/ckpt || \
- install -d -m 755 /var/lib/heartbeat/ckpt
- test -d /var/lib/heartbeat/ccm || \
- install -d -m 750 -o ${user} -g ${group} /var/lib/heartbeat/ccm
- test -d /var/lib/heartbeat/cores/root || \
- install -d -m 700 /var/lib/heartbeat/cores/root
- test -d /var/lib/heartbeat/cores/nobody || \
- install -d -m 700 -o nobody /var/lib/heartbeat/cores/nobody
- test -d /var/lib/heartbeat/cores/hacluster || \
- install -d -m 700 -o ${user} /var/lib/heartbeat/cores/hacluster
- test -d /var/lock/subsys || \
- install -d -m 755 /var/lock/subsys
- test -f /var/run/heartbeat.pid || \
- install -m 644 -o ${user} -g ${group} /dev/null \
- /var/run/heartbeat.pid
- ;;
+ # Create /var environment
+ echo -n "Creating /var environment... "
+ test -d /var/run/heartbeat/ccm || \
+ install -d -m 750 -o ${USER} -g ${GROUP} /var/run/heartbeat/ccm
+ test -d /var/run/heartbeat/crm || \
+ install -d -m 750 -o ${USER} -g ${GROUP} /var/run/heartbeat/crm
+ test -d /var/lib/heartbeat/cores || \
+ install -d -m 755 /var/lib/heartbeat/cores
+ test -d /var/lib/heartbeat/cores/hacluster || \
+ install -d -m 700 -o ${USER} /var/lib/heartbeat/cores/hacluster
+ test -d /var/lib/heartbeat/cores/nobody || \
+ install -d -m 700 -o nobody /var/lib/heartbeat/cores/nobody
+ test -d /var/lib/heartbeat/cores/root || \
+ install -d -m 700 /var/lib/heartbeat/cores/root
+ test -d /var/lib/heartbeat/crm || \
+ install -d -m 750 -o ${USER} -g ${GROUP} /var/lib/heartbeat/crm
+ test -d /var/lib/heartbeat/fencing || \
+ install -d -m 770 -g ${GROUP} /var/lib/heartbeat/fencing
+ test -d /var/lib/heartbeat/lrm || \
+ install -d -m 770 -g ${GROUP} /var/lib/heartbeat/lrm
+ test -d /var/lib/heartbeat/mgmt || \
+ install -d -m 770 -g ${GROUP} /var/lib/heartbeat/mgmt
+ test -d /var/lib/heartbeat/pengine || \
+ install -d -m 750 -o ${USER} -g ${GROUP} /var/run/heartbeat/pengine
+ test -f /var/run/heartbeat.pid || \
+ install -m 644 -o ${USER} -g ${GROUP} /dev/null \
+ /var/run/heartbeat.pid
+ echo "DONE"
+
+ echo -e "\n\n"
+
+ ;;
DEINSTALL)
- if ps -axc | grep -q heartbeat; then
- if yesno "There are some heartbeat processes running. Shall I kill them" y
- then
- killall heartbeat
- sleep 2
- else
- echo "OK ... I hope you know what you are doing."
- fi
- fi
-
- delete_account hacluster haclient
-
- echo "Removing runtime files"
- if [ -d /var/lib/heartbeat ]; then
- rm -r /var/lib/heartbeat
- fi
- if [ -f /var/lock/subsys/heartbeat ]; then
- rm /var/lock/subsys/heartbeat
- fi
- if [ -f /var/run/heartbeat.pid ]; then
- rm /var/run/heartbeat.pid
- fi
- ;;
+
+ echo -e "\n\n"
+
+ # Check for running processes
+ echo -n "Checking if heartbeat is running... "
+ if ps -axc | grep -q heartbeat; then
+ echo -n "FOUND "
+ killall heartbeat
+ echo "KILLED"
+ else
+ echo "NO"
+ fi
+
+ # Remove Heartbeat account
+ echo -n "Removing heartbeat account... "
+ pw groupdel -n ${GROUP}
+ pw userdel -n ${USER}
+ echo "DONE"
+
+ # Cleanup /var environment
+ echo -n "Cleaning up /var environment... "
+
+ 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"
+
+ ;;
esac
diff --git a/sysutils/heartbeat/files/pkg-message.in b/sysutils/heartbeat/files/pkg-message.in
new file mode 100644
index 000000000000..91dbbb67c257
--- /dev/null
+++ b/sysutils/heartbeat/files/pkg-message.in
@@ -0,0 +1,25 @@
+
+# #
+## ##
+### ###
+########################################################
+### ###
+## ##
+# #
+
+ INFORMATION:
+ - Configuration directory: %%PREFIX%%/etc/ha.d
+
+
+ CAVEATS:
+ - bcast is not available on FreeBSD.
+ - BasicSanityCheck is not available on FreeBSD.
+
+# #
+## ##
+### ###
+########################################################
+### ###
+## ##
+# #
+