Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 4 Nov 2006 15:49:40 +0100 (CET)
From:      Ulrich Spoerlein <uspoerlein@gmail.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        scott-ports@tummy.com
Subject:   ports/105144: [PATCH] sysutils/heartbeat: Fix file/dir permissions/ownership and startup script
Message-ID:  <200611041449.kA4Enean031099@roadrunner.q.local>
Resent-Message-ID: <200611041751.kA4Hp34S017904@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         105144
>Category:       ports
>Synopsis:       [PATCH] sysutils/heartbeat: Fix file/dir permissions/ownership and startup script
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Nov 04 17:51:03 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Ulrich Spoerlein
>Release:        FreeBSD 6.2-PRERELEASE i386
>Organization:
>Environment:
System: FreeBSD roadrunner 6.2-PRERELEASE FreeBSD 6.2-PRERELEASE #1: Thu Oct 26 18:55:18 CEST 2006
>Description:
The haclient/hacluster user has to be added *before* installing the rest.
D'oh. That way, even more directories under /var/lib/heartbeat are created.
Recreate them in the pkg-install script too, so pkg_add heartbeat has the 
same effect.

Squash a bash-ism in one of the startup-scripts. It'll abort otherwise.

Added file(s):
- files/patch-ldirectord

Port maintainer (scott-ports@tummy.com) is cc'd.

Generated with FreeBSD Port Tools 0.77
>How-To-Repeat:
>Fix:

--- heartbeat-1.2.5_1.patch begins here ---
Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/sysutils/heartbeat/Makefile,v
retrieving revision 1.8
diff -u -p -u -r1.8 Makefile
--- Makefile	1 Nov 2006 20:02:31 -0000	1.8
+++ Makefile	4 Nov 2006 14:49:00 -0000
@@ -7,6 +7,7 @@
 
 PORTNAME=	heartbeat
 PORTVERSION=	1.2.5
+PORTREVISION=	1
 CATEGORIES=	sysutils
 MASTER_SITES=	http://linux-ha.org/download/
 
@@ -72,8 +73,8 @@ BATCH=no
 post-deinstall:
 	@BATCH=${BATCH} ${SH} ${PKGINSTALL} ${PKGNAME} DEINSTALL
 
-post-install:
-	@BATCH=${BATCH} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
+pre-install:
+	@BATCH=${BATCH} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
 
 # some subdirs treat man as documentation, therefor we have to install
 # those man pages manually if NOPORTDOCS is defined
Index: files/patch-ldirectord
===================================================================
RCS file: files/patch-ldirectord
diff -N files/patch-ldirectord
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-ldirectord	4 Nov 2006 14:49:00 -0000
@@ -0,0 +1,11 @@
+--- 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
+     $@
Index: files/pkg-install.in
===================================================================
RCS file: /home/ncvs/ports/sysutils/heartbeat/files/pkg-install.in,v
retrieving revision 1.3
diff -u -p -u -r1.3 pkg-install.in
--- files/pkg-install.in	1 Nov 2006 20:02:31 -0000	1.3
+++ files/pkg-install.in	4 Nov 2006 14:49:00 -0000
@@ -85,7 +85,7 @@ delete_account() {
 
 case $2 in
 
-POST-INSTALL)
+PRE-INSTALL)
     echo ""
     user=hacluster
     group=haclient
@@ -96,6 +96,14 @@ POST-INSTALL)
     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 || \
--- heartbeat-1.2.5_1.patch ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200611041449.kA4Enean031099>