Bug 95073 - [UPGRADE] sysutils/bacula-server to 1.38.6
Summary: [UPGRADE] sysutils/bacula-server to 1.38.6
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Renato Botelho
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-29 12:40 UTC by Dan Langille
Modified: 2006-03-31 11:13 UTC (History)
1 user (show)

See Also:


Attachments
bacula.patch (13.07 KB, patch)
2006-03-29 12:40 UTC, Dan Langille
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dan Langille 2006-03-29 12:40:16 UTC
	
Upgrade sysutils/bacula-server to 1.38.6 released today.

Change maintainer to myself after discussion with current maintainer.

What appears below is based upon work done for bacula-server-devel
and found in still open PR: http://www.freebsd.org/cgi/query-pr.cgi?pr=ports%2F94832
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2006-03-29 12:44:11 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback
Comment 2 Renato Botelho freebsd_committer freebsd_triage 2006-03-29 13:21:35 UTC
Responsible Changed
From-To: freebsd-ports-bugs->garga

I'll take it.
Comment 3 Renato Botelho freebsd_committer freebsd_triage 2006-03-29 14:03:50 UTC
We have a problem here, this port installs 3 sample scripts on
${PREFIX}/etc/rc.d, it installs these files using the following
install commands:

/usr/bin/install -c -o root -g wheel -m 0754 bacula
/usr/local/etc/rc.d/z-bacula.sh.sample
/usr/bin/install -c -o root -g wheel -m 0754 bacula-ctl-dir
/usr/local/etc/rc.d/z-bacula-ctl-dir.sh.sample
/usr/bin/install -c -o root -g wheel -m 0754 bacula-ctl-sd
/usr/local/etc/rc.d/z-bacula-ctl-sd.sh.sample

It installs with execute attribute, since rc was changed and now
execute any file on rc.d dir, ignoring the extension, and checking
just if it has exec attribute, these sample files will be executed
at boot time.

The best thing to do, IMHO, is create a new rcNg startup script and
use USE_RC_SUBR facility to install/remove this. Here is the
Porter's Handbook reference to it:

http://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/rc-scripts.html

BTW, z-bacula.sh is not on pkg-plist.
-- 
Renato Botelho <garga @ FreeBSD.org>
               <freebsd @ galle.com.br>
GnuPG Key: http://www.FreeBSD.org/~garga/pubkey.asc
Comment 4 Dan Langille 2006-03-29 17:48:02 UTC
On 29 Mar 2006 at 10:03, Renato Botelho wrote:

> We have a problem here, this port installs 3 sample scripts on
> ${PREFIX}/etc/rc.d, it installs these files using the following
> install commands:
> 
> /usr/bin/install -c -o root -g wheel -m 0754 bacula
> /usr/local/etc/rc.d/z-bacula.sh.sample
> /usr/bin/install -c -o root -g wheel -m 0754 bacula-ctl-dir
> /usr/local/etc/rc.d/z-bacula-ctl-dir.sh.sample
> /usr/bin/install -c -o root -g wheel -m 0754 bacula-ctl-sd
> /usr/local/etc/rc.d/z-bacula-ctl-sd.sh.sample
> 
> It installs with execute attribute, since rc was changed and now
> execute any file on rc.d dir, ignoring the extension, and checking
> just if it has exec attribute, these sample files will be executed
> at boot time.
>
> The best thing to do, IMHO, is create a new rcNg startup script and
> use USE_RC_SUBR facility to install/remove this. Here is the
> Porter's Handbook reference to it:
> 
> http://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/rc-scripts.html

Have a look at http://www.langille.org/tmp/bacula-dir.sh.in.txt

That's working for me here on 6.1-PRERELEASE.

For FreeBSD 4.x, should we stick with the old scripts (e.g. /usr/local/etc/rc.d/z-bacula-ctl-dir.sh.sample)?

> BTW, z-bacula.sh is not on pkg-plist.

Thanks.  It should not be installed at all.

-- 
Dan Langille : Software Developer looking for work
my resume: http://www.freebsddiary.org/dan_langille.php
Comment 5 Dan Langille 2006-03-29 21:30:39 UTC
Resent to gnats

Find attached an update for the sysutils/bacula-server port and the
bacula-client port as well.


--- bacula-server.patch starts here -----
diff -ruN /usr/ports/sysutils/bacula-server/Makefile bacula-server/Makefile
--- /usr/ports/sysutils/bacula-server/Makefile	Sun Mar 19 05:19:59 2006
+++ bacula-server/Makefile	Wed Mar 29 13:32:13 2006
@@ -6,19 +6,21 @@
 #

 PORTNAME=	bacula
-PORTVERSION=	1.38.5
-PORTREVISION=	1
+DISTVERSION=	1.38.6
+#PORTREVISION=	1
 CATEGORIES=	sysutils
 MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
 MASTER_SITE_SUBDIR=	bacula
 PKGNAMESUFFIX?=	-server
 UNIQUENAME?=${PORTNAME}${PKGNAMESUFFIX}

-MAINTAINER=	Lars.Koeller@Uni-Bielefeld.DE
+MAINTAINER=	dan@langille.org
 COMMENT?=	The network backup solution (server)

 CONFLICTS=	bacula-server-devel-[0-9]* bacula-client-devel-[0-9]*

+USE_RC_SUBR?=	z-bacula-dir.sh z-bacula-sd.sh
+
 # The user/group IDs below are registered, see
 # http://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/book.html#DADS-UID
 #
@@ -28,17 +30,22 @@
 CONFIGURE_ARGS=	--with-tcp-wrappers=/usr/lib \
 		--enable-smartalloc \
 		--with-working-dir=${BACULA_DIR} \
-		--with-scriptdir=${PREFIX}/share/bacula \
+		--with-scriptdir=${PREFIX}/share/${PORTNAME} \
 		--mandir=${PREFIX}/man \
-		--with-fd-user=root \
-		--with-fd-group=wheel \
-		--with-dir-user=bacula \
-		--with-dir-group=bacula \
-		--with-sd-user=bacula \
-		--with-sd-group=operator \
 		--with-readline=yes \
 		--disable-conio

+.if defined(WITH_CLIENT_ONLY)
+CONFIGURE_ARGS+=		--with-fd-user=root \
+		--with-fd-group=wheel
+.else
+CONFIGURE_ARGS+= 		--with-dir-user=bacula \
+		--with-dir-group=bacula \
+		--with-sd-user=bacula \
+		--with-sd-group=operator
+.endif
+
+
 CONFIGURE_ENV+=	CPPFLAGS="-I/usr/include/readline -I${LOCALBASE}/include" \
 		LDFLAGS="-L${LOCALBASE}/lib" \
 		PTHREAD_CFLAGS="${PTHREAD_CFLAGS}" \
@@ -66,6 +73,7 @@
 OPTIONS+=	POSTGRESQL "Use PostgreSQL database instead of SqLite" off
 OPTIONS+=	MTX "Install mtx for control of autochanger devices" off
 .endif
+
 OPTIONS+=	OPENSSL "Enable OpenSSL for encrypted communication" off

 # Prepare if gnome-console is selected this must be happen before
@@ -77,7 +85,7 @@

 PLIST_SUB+=	BACULA_DIR=${BACULA_DIR}

-MAN8=           bacula.8
+MAN8=		bacula.8

 .include <bsd.port.pre.mk>

@@ -94,6 +102,7 @@
 .if defined(WITH_CLIENT_ONLY)
 CONFFILES=	fd
 CONFIGURE_ARGS+=	--enable-client-only
+
 PKGDEINSTALL=	${PKGDIR}/pkg-deinstall.client
 PKGINSTALL=	${PKGDIR}/pkg-install.client
 # Build gnome-console
@@ -190,22 +199,38 @@
 # 	Dont mkdir ${PREFIX}/share/bacula cause it's empty
 	@${REINPLACE_CMD} -e 's|^\(fd_subdirs = .*\)scripts\(.*\)|\1\2|g' ${WRKSRC}/Makefile.in
 	${REINPLACE_CMD} -e 's|\(.*$$(MKDIR) $$(DESTDIR)$$(scriptdir)\)|#\1|g' ${WRKSRC}/Makefile.in
+#	${REINPLACE_CMD} -e 's|/z-bacula-server.sh.sample|/z-bacula-client.sh.sample|g' ${WRKSRC}/scripts/Makefile.in
 .else
 #	In server port don't install filed
 	@${REINPLACE_CMD} -e 's|^all_subdirs = .*|all_subdirs = scripts src\/lib src\/findlib $${subdirs}|g' ${WRKSRC}/Makefile.in
 .endif

+pre-install:
+	if [ ! -d "${BACULA_DIR}" ]; then \
+		${ECHO_CMD} "creating ${BACULA_DIR}" ; \
+		${MKDIR} ${BACULA_DIR}; \
+	else \
+		${ECHO_CMD} "${BACULA_DIR} already exists"; \
+	fi
+
+.if !defined(WITH_CLIENT_ONLY)
+# 	Extend /etc/services and install UID/GID
+	@ ${SETENV} PKG_PREFIX=${PREFIX} \
+		${SH} ${PKGINSTALL} ${PORTNAME} PRE-INSTALL
+.endif
+
+
 post-install:
 #	Migration: move existing bacula.sh to z-bacula.sh to start bacula AFTER DB start
 	if [ -f ${PREFIX}/etc/rc.d/bacula.sh ]; then \
-		${MV} ${PREFIX}/etc/rc.d/bacula.sh ${PREFIX}/etc/rc.d/z-bacula.sh; \
+		${MV} ${PREFIX}/etc/rc.d/bacula.sh ${PREFIX}/etc/rc.d/z-bacula-server.sh; \
 	fi
 	if [ -f ${PREFIX}/etc/rc.d/bacula.sh.sample ]; then \
-		${MV} ${PREFIX}/etc/rc.d/bacula.sh.sample ${PREFIX}/etc/rc.d/z-bacula.sh.sample; \
+		${MV} ${PREFIX}/etc/rc.d/bacula.sh.sample ${PREFIX}/etc/rc.d/z-bacula-server.sh.sample; \
 	fi
 .if defined(WITH_CLIENT_ONLY)
 # 	Install start script
-	${INSTALL_SCRIPT} ${WRKSRC}/scripts/bacula ${PREFIX}/etc/rc.d/z-bacula.sh.sample
+	${INSTALL_SCRIPT} ${WRKSRC}/scripts/bacula-ctl-fd ${PREFIX}/etc/rc.d/z-bacula-ctl-fd.sh.sample
 # 	Extend only /etc/services
 	@ ${SETENV} PKG_PREFIX=${PREFIX} \
 		${SH} ${PKGINSTALL} ${PORTNAME}
@@ -250,10 +275,8 @@
 	${INSTALL_DATA} ${WRKDIR}/${PORTNAME}-docs-${PORTVERSION}/developers/developers.pdf ${DOCSDIR}
 	${INSTALL_DATA} ${WRKDIR}/${PORTNAME}-${PORTVERSION}/kernstodo ${DOCSDIR}
 .endif
+
 .else
-# 	Extend /etc/services and install UID/GID
-	@ ${SETENV} PKG_PREFIX=${PREFIX} \
-		${SH} ${PKGINSTALL} ${PORTNAME} POST-INSTALL
 # 	Install config files and preserve existing ones
 	${INSTALL_SCRIPT} ${FILESDIR}/chio-bacula ${PREFIX}/sbin
 	if [ -f ${PREFIX}/etc/bacula-barcodes ]; then \
@@ -327,7 +350,7 @@
 	@${ECHO_MSG} "For USB support read the bacula manual!! It could be necessary"
 	@${ECHO_MSG} "to configure/compile a new kernel!"
 	@${ECHO_MSG} ""
-	@${ECHO_MSG} "Look at ${PREFIX}/share/bacula/update_bacula_tables for"
+	@${ECHO_MSG} "Look at $PREFIX/share/bacula/update_bacula_tables for"
 	@${ECHO_MSG} "database update procedure. Details can be found in the"
 	@${ECHO_MSG} "ReleaseNotes"
 .endif
diff -ruN /usr/ports/sysutils/bacula-server/distinfo bacula-server/distinfo
--- /usr/ports/sysutils/bacula-server/distinfo	Fri Feb  3 17:04:21 2006
+++ bacula-server/distinfo	Wed Mar 29 05:00:57 2006
@@ -1,6 +1,3 @@
-MD5 (bacula-1.38.5.tar.gz) = 7f8f0f642b22dc2089ef7b42eb08f826
-SHA256 (bacula-1.38.5.tar.gz) = df760f15ba4667fbc1ac2d985b982920eb3a1d25c17ba744bc688f0f10fe47c7
-SIZE (bacula-1.38.5.tar.gz) = 1911024
-MD5 (bacula-docs-1.38.5.tar.gz) = 11035d75fdd9d10801f0b3dda1f09440
-SHA256 (bacula-docs-1.38.5.tar.gz) = f83e60a33ac73eb35fce30ce5a1beecd596024068386a91662b43468bb42b853
-SIZE (bacula-docs-1.38.5.tar.gz) = 23183760
+MD5 (bacula-1.38.6.tar.gz) = 219382ae85671c8ff13f375b6d9aa079
+SHA256 (bacula-1.38.6.tar.gz) = e671f3ff20c97e8392908920ae9ca38f814359c5b85b89625d43df9ad7349ed3
+SIZE (bacula-1.38.6.tar.gz) = 1952827
diff -ruN /usr/ports/sysutils/bacula-server/files/patch-scripts-Makefile.in bacula-server/files/patch-scripts-Makefile.in
--- /usr/ports/sysutils/bacula-server/files/patch-scripts-Makefile.in	Fri Feb  3 17:04:21 2006
+++ bacula-server/files/patch-scripts-Makefile.in	Wed Mar 29 12:55:56 2006
@@ -1,52 +1,48 @@
-*** scripts/Makefile.in.orig	Thu Nov  3 15:33:16 2005
---- scripts/Makefile.in	Thu Nov 17 08:31:29 2005
-***************
-*** 33,43 ****
-  	$(MKDIR) $(DESTDIR)$(mandir)
-
-  install: installdirs
-! 	$(INSTALL_SCRIPT) startmysql $(DESTDIR)$(scriptdir)/startmysql
-! 	$(INSTALL_SCRIPT) stopmysql $(DESTDIR)$(scriptdir)/stopmysql
-! 	$(INSTALL_SCRIPT) bconsole $(DESTDIR)$(scriptdir)/bconsole
-! 	$(INSTALL_SCRIPT) gconsole $(DESTDIR)$(scriptdir)/gconsole
-! 	$(INSTALL_SCRIPT) bacula $(DESTDIR)$(scriptdir)/bacula
-  	@if  test -f ${DESTDIR}${scriptdir}/mtx-changer; then \
-  	   echo "  ==> Saving existing mtx-changer to mtx-changer.old"; \
-  	   $(MV) -f ${DESTDIR}${scriptdir}/mtx-changer ${DESTDIR}${scriptdir}/mtx-changer.old; \
---- 33,43 ----
-  	$(MKDIR) $(DESTDIR)$(mandir)
-
-  install: installdirs
-! #	$(INSTALL_SCRIPT) startmysql $(DESTDIR)$(scriptdir)/startmysql
-! #	$(INSTALL_SCRIPT) stopmysql $(DESTDIR)$(scriptdir)/stopmysql
-! #	$(INSTALL_SCRIPT) bconsole $(DESTDIR)$(scriptdir)/bconsole
-! #	$(INSTALL_SCRIPT) gconsole $(DESTDIR)$(scriptdir)/gconsole
-! 	$(INSTALL_SCRIPT) bacula $(DESTDIR)$(sysconfdir)/rc.d/z-bacula.sh.sample
-  	@if  test -f ${DESTDIR}${scriptdir}/mtx-changer; then \
-  	   echo "  ==> Saving existing mtx-changer to mtx-changer.old"; \
-  	   $(MV) -f ${DESTDIR}${scriptdir}/mtx-changer ${DESTDIR}${scriptdir}/mtx-changer.old; \
-***************
-*** 48,58 ****
-  	   $(MV) -f ${DESTDIR}${scriptdir}/dvd-handler ${DESTDIR}${scriptdir}/dvd-handler.old; \
-  	fi
-  	$(INSTALL_SCRIPT) dvd-handler $(DESTDIR)$(scriptdir)/dvd-handler
-! 	$(INSTALL_DATA)   btraceback.gdb $(DESTDIR)$(scriptdir)/btraceback.gdb
-! 	$(INSTALL_DATA)   btraceback.dbx $(DESTDIR)$(scriptdir)/btraceback.dbx
-! 	$(INSTALL_SCRIPT) btraceback $(DESTDIR)$(sbindir)/btraceback
-! 	gzip <bacula.man >bacula.8.gz
-! 	$(INSTALL_DATA)   bacula.8.gz $(DESTDIR)$(mandir)/bacula.8.gz
-  	@rm -f bacula.8.gz
-
-
---- 48,58 ----
-  	   $(MV) -f ${DESTDIR}${scriptdir}/dvd-handler ${DESTDIR}${scriptdir}/dvd-handler.old; \
-  	fi
-  	$(INSTALL_SCRIPT) dvd-handler $(DESTDIR)$(scriptdir)/dvd-handler
-! #	$(INSTALL_DATA)   btraceback.gdb $(DESTDIR)$(scriptdir)/btraceback.gdb
-! #	$(INSTALL_DATA)   btraceback.dbx $(DESTDIR)$(scriptdir)/btraceback.dbx
-! #	$(INSTALL_SCRIPT) btraceback $(DESTDIR)$(sbindir)/btraceback
-! #	gzip <bacula.man >bacula.8.gz
-! 	$(INSTALL_DATA)   bacula.man $(DESTDIR)$(mandir)/bacula.8
-  	@rm -f bacula.8.gz
-
-
+--- scripts/Makefile.in.orig	Sat Mar 25 08:37:41 2006
++++ scripts/Makefile.in	Sat Mar 25 10:47:33 2006
+@@ -33,14 +33,14 @@
+ 	$(MKDIR) $(DESTDIR)$(mandir)
+
+ install: installdirs
+-	$(INSTALL_SCRIPT) startmysql $(DESTDIR)$(scriptdir)/startmysql
+-	$(INSTALL_SCRIPT) stopmysql $(DESTDIR)$(scriptdir)/stopmysql
+-	$(INSTALL_SCRIPT) bconsole $(DESTDIR)$(scriptdir)/bconsole
+-	$(INSTALL_SCRIPT) gconsole $(DESTDIR)$(scriptdir)/gconsole
+-	$(INSTALL_SCRIPT) bacula $(DESTDIR)$(scriptdir)/bacula
+-	$(INSTALL_SCRIPT) bacula-ctl-dir $(DESTDIR)$(scriptdir)/bacula-ctl-dir
+-	$(INSTALL_SCRIPT) bacula-ctl-fd $(DESTDIR)$(scriptdir)/bacula-ctl-fd
+-	$(INSTALL_SCRIPT) bacula-ctl-sd $(DESTDIR)$(scriptdir)/bacula-ctl-sd
++#	$(INSTALL_SCRIPT) startmysql $(DESTDIR)$(scriptdir)/startmysql
++#	$(INSTALL_SCRIPT) stopmysql $(DESTDIR)$(scriptdir)/stopmysql
++#	$(INSTALL_SCRIPT) bconsole $(DESTDIR)$(scriptdir)/bconsole
++#	$(INSTALL_SCRIPT) gconsole $(DESTDIR)$(scriptdir)/gconsole
++#	$(INSTALL_SCRIPT) bacula $(DESTDIR)$(scriptdir)/bacula
++#	$(INSTALL_SCRIPT) bacula-ctl-dir $(DESTDIR)$(scriptdir)/bacula-ctl-dir
++#	$(INSTALL_SCRIPT) bacula-ctl-fd $(DESTDIR)$(scriptdir)/bacula-ctl-fd
++#	$(INSTALL_SCRIPT) bacula-ctl-sd $(DESTDIR)$(scriptdir)/bacula-ctl-sd
+ 	@if  test -f ${DESTDIR}${scriptdir}/mtx-changer; then \
+ 	   echo "  ==> Saving existing mtx-changer to mtx-changer.old"; \
+ 	   $(MV) -f ${DESTDIR}${scriptdir}/mtx-changer ${DESTDIR}${scriptdir}/mtx-changer.old; \
+@@ -56,14 +56,14 @@
+ 	   $(MV) -f ${DESTDIR}${scriptdir}/dvd-handler ${DESTDIR}${scriptdir}/dvd-handler.old; \
+ 	fi
+ 	$(INSTALL_SCRIPT) dvd-handler $(DESTDIR)$(scriptdir)/dvd-handler
+-	$(INSTALL_DATA)   btraceback.gdb $(DESTDIR)$(scriptdir)/btraceback.gdb
+-	$(INSTALL_DATA)   btraceback.dbx $(DESTDIR)$(scriptdir)/btraceback.dbx
+-	chmod 0644 $(DESTDIR)$(scriptdir)/btraceback.gdb \
+-		   $(DESTDIR)$(scriptdir)/btraceback.dbx
+-	$(INSTALL_SCRIPT) btraceback $(DESTDIR)$(sbindir)/btraceback
+-	gzip <bacula.man >bacula.8.gz
+-	$(INSTALL_DATA)   bacula.8.gz $(DESTDIR)$(mandir)/bacula.8.gz
+-	@rm -f bacula.8.gz
++#	$(INSTALL_DATA)   btraceback.gdb $(DESTDIR)$(scriptdir)/btraceback.gdb
++#	$(INSTALL_DATA)   btraceback.dbx $(DESTDIR)$(scriptdir)/btraceback.dbx
++#	chmod 0644 $(DESTDIR)$(scriptdir)/btraceback.gdb \
++#		   $(DESTDIR)$(scriptdir)/btraceback.dbx
++#	$(INSTALL_SCRIPT) btraceback $(DESTDIR)$(sbindir)/btraceback
++#	gzip <bacula.man >bacula.8.gz
++	$(INSTALL_DATA)   bacula.man $(DESTDIR)$(mandir)/bacula.8
++#	@rm -f bacula.8.gz
+
+
+ uninstall:
diff -ruN /usr/ports/sysutils/bacula-server/files/z-bacula-dir.sh.in bacula-server/files/z-bacula-dir.sh.in
--- /usr/ports/sysutils/bacula-server/files/z-bacula-dir.sh.in	Wed Dec 31 19:00:00 1969
+++ bacula-server/files/z-bacula-dir.sh.in	Wed Mar 29 13:28:58 2006
@@ -0,0 +1,29 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+# PROVIDE: utility
+# REQUIRE: DAEMON
+# KEYWORD: shutdown
+
+#
+# DO NOT CHANGE THESE DEFAULT VALUES HERE
+# SET THEM IN THE /etc/rc.conf FILE
+#
+bacula_dir_enable=${bacula_dir_enable-"NO"}
+bacula_dir_flags=${bacula_dir_flags-" -u bacula -g bacula -v -c /usr/local/etc/bacula-dir.conf"}
+bacula_dir_pidfile=${bacula_dir_pidfile-"/var/run/bacula-dir.9101.pid"}
+
+. %%RC_SUBR%%
+
+name="bacula_dir"
+rcvar=`set_rcvar`
+command=/usr/local/sbin/bacula-dir
+
+load_rc_config $name
+
+pidfile="${bacula_dir_pidfile}"
+
+start_cmd="echo \"Starting ${name}.\"; ${command} ${bacula_dir_flags} ${command_args}"
+
+run_rc_command "$1"
diff -ruN /usr/ports/sysutils/bacula-server/files/z-bacula-fd.sh.in bacula-server/files/z-bacula-fd.sh.in
--- /usr/ports/sysutils/bacula-server/files/z-bacula-fd.sh.in	Wed Dec 31 19:00:00 1969
+++ bacula-server/files/z-bacula-fd.sh.in	Wed Mar 29 13:28:43 2006
@@ -0,0 +1,29 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+# PROVIDE: utility
+# REQUIRE: DAEMON
+# KEYWORD: shutdown
+
+#
+# DO NOT CHANGE THESE DEFAULT VALUES HERE
+# SET THEM IN THE /etc/rc.conf FILE
+#
+bacula_fd_enable=${bacula_fd_enable-"NO"}
+bacula_fd_flags=${bacula_fd_flags-" -u root -g wheel -v -c /usr/local/etc/bacula-fd.conf"}
+bacula_fd_pidfile=${bacula_fd_pidfile-"/var/run/bacula-fd.9102.pid"}
+
+. %%RC_SUBR%%
+
+name="bacula_fd"
+rcvar=`set_rcvar`
+command=/usr/local/sbin/bacula-fd
+
+load_rc_config $name
+
+pidfile="${bacula_fd_pidfile}"
+
+start_cmd="echo \"Starting ${name}.\"; ${command} ${bacula_fd_flags} ${command_args}"
+
+run_rc_command "$1"
diff -ruN /usr/ports/sysutils/bacula-server/files/z-bacula-sd.sh.in bacula-server/files/z-bacula-sd.sh.in
--- /usr/ports/sysutils/bacula-server/files/z-bacula-sd.sh.in	Wed Dec 31 19:00:00 1969
+++ bacula-server/files/z-bacula-sd.sh.in	Wed Mar 29 13:28:53 2006
@@ -0,0 +1,29 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+# PROVIDE: utility
+# REQUIRE: DAEMON
+# KEYWORD: shutdown
+
+#
+# DO NOT CHANGE THESE DEFAULT VALUES HERE
+# SET THEM IN THE /etc/rc.conf FILE
+#
+bacula_sd_enable=${bacula_sd_enable-"NO"}
+bacula_sd_flags=${bacula_sd_flags-" -u bacula -g bacula -v -c /usr/local/etc/bacula-sd.conf"}
+bacula_sd_pidfile=${bacula_sd_pidfile-"/var/run/bacula-sd.9103.pid"}
+
+. %%RC_SUBR%%
+
+name="bacula_sd"
+rcvar=`set_rcvar`
+command=/usr/local/sbin/bacula-sd
+
+load_rc_config $name
+
+pidfile="${bacula_sd_pidfile}"
+
+start_cmd="echo \"Starting ${name}.\"; ${command} ${bacula_sd_flags} ${command_args}"
+
+run_rc_command "$1"
diff -ruN /usr/ports/sysutils/bacula-server/pkg-install bacula-server/pkg-install
--- /usr/ports/sysutils/bacula-server/pkg-install	Mon Jan 12 14:56:23 2004
+++ bacula-server/pkg-install	Wed Mar 29 04:55:53 2006
@@ -16,12 +16,16 @@
 fi

 case $2 in
-POST-INSTALL)
+PRE-INSTALL)
 	# Install UID/GID
 	USER=bacula
 	GROUP=${USER}
 	UID=910
 	GID=${UID}
+
+	if [ ! -d ${BACULA_DIR} ]; then
+		mkdir -p ${BACULA_DIR}
+	fi

 	if pw group show "${GROUP}" 2>/dev/null; then
 		echo "You already have a group \"${GROUP}\", so I will use it."
diff -ruN /usr/ports/sysutils/bacula-server/pkg-plist bacula-server/pkg-plist
--- /usr/ports/sysutils/bacula-server/pkg-plist	Fri Feb  3 17:04:21 2006
+++ bacula-server/pkg-plist	Wed Mar 29 12:54:34 2006
@@ -1,5 +1,4 @@
 %%DATADIR%%/query.sql
-etc/rc.d/z-bacula.sh.sample
 sbin/chio-bacula
 sbin/bacula-dir
 sbin/bacula-sd
@@ -13,6 +12,7 @@
 sbin/dbcheck
 sbin/bsmtp
 @unexec if cmp -s %D/share/bacula/mtx-changer.old %D/share/bacula/mtx-changer; then rm -f %D/share/bacula/mtx-changer.old; fi
+@unexec if cmp -s %D/share/bacula/disk-changer.old %D/share/bacula/disk-changer; then rm -f %D/share/bacula/disk-changer.old; fi
 %%DATADIR%%/mtx-changer
 %%DATADIR%%/create_bacula_database
 %%DATADIR%%/create_%%DBTYPE%%_database
@@ -29,8 +29,10 @@
 %%DATADIR%%/delete_catalog_backup
 %%DATADIR%%/make_catalog_backup
 %%DATADIR%%/dvd-handler
+%%DATADIR%%/disk-changer

 @dirrm %%DATADIR%%
-@unexec /usr/bin/killall badula-sd > /dev/null 2>&1 || true
+@unexec /usr/bin/killall bacula-sd  > /dev/null 2>&1 || true
 @unexec /usr/bin/killall bacula-dir > /dev/null 2>&1 || true
 @exec mkdir -p %%BACULA_DIR%%
+@dirrmtry %%BACULA_DIR%%
diff -ruN /usr/ports/sysutils/bacula-server/pkg-plist.client bacula-server/pkg-plist.client
--- /usr/ports/sysutils/bacula-server/pkg-plist.client	Sun May 15 10:44:50 2005
+++ bacula-server/pkg-plist.client	Wed Mar 29 12:54:42 2006
@@ -1,7 +1,7 @@
-etc/rc.d/z-bacula.sh.sample
 sbin/bacula-fd
 sbin/bconsole
 %%GNOMECONS%%sbin/gnome-console
 %%WXCONS%%sbin/wx-console
 @unexec /usr/bin/killall badula-fd > /dev/null 2>&1 || true
 @exec mkdir -p %%BACULA_DIR%%
+@dirrmtry %%BACULA_DIR%%
----- bacula-server.patch ends --------

----- bacula-client.patch starts ------
diff -ruN /usr/ports/sysutils/bacula-client/Makefile bacula-client/Makefile
--- /usr/ports/sysutils/bacula-client/Makefile	Mon Nov 29 15:37:10 2004
+++ bacula-client/Makefile	Wed Mar 29 13:36:15 2006
@@ -9,5 +9,6 @@
 PLIST=		${PKGDIR}/pkg-plist.client

 WITH_CLIENT_ONLY=	yes
+USE_RC_SUBR=	z-bacula-fd.sh

 .include "${MASTERDIR}/Makefile"
----- bacula-client.patch end -----
Comment 6 Renato Botelho freebsd_committer freebsd_triage 2006-03-30 19:28:58 UTC
Dear maintainer, after made many tests with Dan Langille, here is the final
patch. Do you approve this? And do you approve to pass maintainership to
Dan?

Thanks

------------------- bacula.diff starts here ------------------------
Index: bacula-client/Makefile
===================================================================
RCS file: /home/pcvs/ports/sysutils/bacula-client/Makefile,v
retrieving revision 1.1
diff -u -r1.1 Makefile
--- bacula-client/Makefile	29 Nov 2004 20:37:10 -0000	1.1
+++ bacula-client/Makefile	30 Mar 2006 18:24:39 -0000
@@ -9,5 +9,6 @@
 PLIST=		${PKGDIR}/pkg-plist.client
 
 WITH_CLIENT_ONLY=	yes
+USE_RC_SUBR=	z-bacula-fd.sh
 
 .include "${MASTERDIR}/Makefile"
Index: bacula-server/Makefile
===================================================================
RCS file: /home/pcvs/ports/sysutils/bacula-server/Makefile,v
retrieving revision 1.62
diff -u -r1.62 Makefile
--- bacula-server/Makefile	15 Mar 2006 10:23:50 -0000	1.62
+++ bacula-server/Makefile	30 Mar 2006 18:24:39 -0000
@@ -6,19 +6,22 @@
 #
 
 PORTNAME=	bacula
-PORTVERSION=	1.38.5
-PORTREVISION=	1
+DISTVERSION=	1.38.6
+#PORTREVISION=	1
 CATEGORIES=	sysutils
 MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
 MASTER_SITE_SUBDIR=	bacula
 PKGNAMESUFFIX?=	-server
-UNIQUENAME?=${PORTNAME}${PKGNAMESUFFIX}
 
-MAINTAINER=	Lars.Koeller@Uni-Bielefeld.DE
+MAINTAINER=	dan@langille.org
 COMMENT?=	The network backup solution (server)
 
 CONFLICTS=	bacula-server-devel-[0-9]* bacula-client-devel-[0-9]*
 
+UNIQUENAME?=${PORTNAME}${PKGNAMESUFFIX}
+
+USE_RC_SUBR?=	z-bacula-dir.sh z-bacula-sd.sh
+
 # The user/group IDs below are registered, see
 # http://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/book.html#DADS-UID
 #
@@ -28,17 +31,21 @@
 CONFIGURE_ARGS=	--with-tcp-wrappers=/usr/lib \
 		--enable-smartalloc \
 		--with-working-dir=${BACULA_DIR} \
-		--with-scriptdir=${PREFIX}/share/bacula \
+		--with-scriptdir=${PREFIX}/share/${PORTNAME} \
 		--mandir=${PREFIX}/man \
-		--with-fd-user=root \
-		--with-fd-group=wheel \
-		--with-dir-user=bacula \
-		--with-dir-group=bacula \
-		--with-sd-user=bacula \
-		--with-sd-group=operator \
 		--with-readline=yes \
 		--disable-conio
 
+.if defined(WITH_CLIENT_ONLY)
+CONFIGURE_ARGS+=		--with-fd-user=root \
+		--with-fd-group=wheel
+.else
+CONFIGURE_ARGS+=--with-dir-user=bacula \
+		--with-dir-group=bacula \
+		--with-sd-user=bacula \
+		--with-sd-group=operator
+.endif
+
 CONFIGURE_ENV+=	CPPFLAGS="-I/usr/include/readline -I${LOCALBASE}/include" \
 		LDFLAGS="-L${LOCALBASE}/lib" \
 		PTHREAD_CFLAGS="${PTHREAD_CFLAGS}" \
@@ -66,6 +73,7 @@
 OPTIONS+=	POSTGRESQL "Use PostgreSQL database instead of SqLite" off
 OPTIONS+=	MTX "Install mtx for control of autochanger devices" off
 .endif
+
 OPTIONS+=	OPENSSL "Enable OpenSSL for encrypted communication" off
 
 # Prepare if gnome-console is selected this must be happen before
@@ -77,7 +85,7 @@
 
 PLIST_SUB+=	BACULA_DIR=${BACULA_DIR}
 
-MAN8=           bacula.8
+MAN8=		bacula.8
 
 .include <bsd.port.pre.mk>
 
@@ -94,6 +102,7 @@
 .if defined(WITH_CLIENT_ONLY)
 CONFFILES=	fd
 CONFIGURE_ARGS+=	--enable-client-only
+
 PKGDEINSTALL=	${PKGDIR}/pkg-deinstall.client
 PKGINSTALL=	${PKGDIR}/pkg-install.client
 # Build gnome-console
@@ -195,17 +204,22 @@
 	@${REINPLACE_CMD} -e 's|^all_subdirs = .*|all_subdirs = scripts src\/lib src\/findlib $${subdirs}|g' ${WRKSRC}/Makefile.in
 .endif
 
-post-install:
-#	Migration: move existing bacula.sh to z-bacula.sh to start bacula AFTER DB start
-	if [ -f ${PREFIX}/etc/rc.d/bacula.sh ]; then \
-		${MV} ${PREFIX}/etc/rc.d/bacula.sh ${PREFIX}/etc/rc.d/z-bacula.sh; \
-	fi
-	if [ -f ${PREFIX}/etc/rc.d/bacula.sh.sample ]; then \
-		${MV} ${PREFIX}/etc/rc.d/bacula.sh.sample ${PREFIX}/etc/rc.d/z-bacula.sh.sample; \
+pre-install:
+	if [ ! -d "${BACULA_DIR}" ]; then \
+		${ECHO_CMD} "creating ${BACULA_DIR}" ; \
+		${MKDIR} ${BACULA_DIR}; \
+	else \
+		${ECHO_CMD} "${BACULA_DIR} already exists"; \
 	fi
+
+.if !defined(WITH_CLIENT_ONLY)
+# 	Extend /etc/services and install UID/GID
+	@ ${SETENV} PKG_PREFIX=${PREFIX} \
+		${SH} ${PKGINSTALL} ${PORTNAME} PRE-INSTALL
+.endif
+
+post-install:
 .if defined(WITH_CLIENT_ONLY)
-# 	Install start script
-	${INSTALL_SCRIPT} ${WRKSRC}/scripts/bacula ${PREFIX}/etc/rc.d/z-bacula.sh.sample
 # 	Extend only /etc/services
 	@ ${SETENV} PKG_PREFIX=${PREFIX} \
 		${SH} ${PKGINSTALL} ${PORTNAME}
@@ -233,7 +247,6 @@
 	fi
 .endif
 
-#	@${CHMOD} a+x ${WRKSRC}/scripts/bacula.man
 .if defined(WITH_CLIENT_ONLY)
 	${INSTALL_MAN} ${WRKSRC}/scripts/bacula.man ${PREFIX}/man/man8/bacula.8
 .endif
@@ -250,10 +263,8 @@
 	${INSTALL_DATA} ${WRKDIR}/${PORTNAME}-docs-${PORTVERSION}/developers/developers.pdf ${DOCSDIR}
 	${INSTALL_DATA} ${WRKDIR}/${PORTNAME}-${PORTVERSION}/kernstodo ${DOCSDIR}
 .endif
+
 .else
-# 	Extend /etc/services and install UID/GID
-	@ ${SETENV} PKG_PREFIX=${PREFIX} \
-		${SH} ${PKGINSTALL} ${PORTNAME} POST-INSTALL
 # 	Install config files and preserve existing ones
 	${INSTALL_SCRIPT} ${FILESDIR}/chio-bacula ${PREFIX}/sbin
 	if [ -f ${PREFIX}/etc/bacula-barcodes ]; then \
@@ -327,7 +338,7 @@
 	@${ECHO_MSG} "For USB support read the bacula manual!! It could be necessary"
 	@${ECHO_MSG} "to configure/compile a new kernel!"
 	@${ECHO_MSG} ""
-	@${ECHO_MSG} "Look at ${PREFIX}/share/bacula/update_bacula_tables for"
+	@${ECHO_MSG} "Look at $PREFIX/share/bacula/update_bacula_tables for"
 	@${ECHO_MSG} "database update procedure. Details can be found in the"
 	@${ECHO_MSG} "ReleaseNotes"
 .endif
Index: bacula-server/distinfo
===================================================================
RCS file: /home/pcvs/ports/sysutils/bacula-server/distinfo,v
retrieving revision 1.20
diff -u -r1.20 distinfo
--- bacula-server/distinfo	19 Jan 2006 20:06:47 -0000	1.20
+++ bacula-server/distinfo	30 Mar 2006 18:24:39 -0000
@@ -1,6 +1,3 @@
-MD5 (bacula-1.38.5.tar.gz) = 7f8f0f642b22dc2089ef7b42eb08f826
-SHA256 (bacula-1.38.5.tar.gz) = df760f15ba4667fbc1ac2d985b982920eb3a1d25c17ba744bc688f0f10fe47c7
-SIZE (bacula-1.38.5.tar.gz) = 1911024
-MD5 (bacula-docs-1.38.5.tar.gz) = 11035d75fdd9d10801f0b3dda1f09440
-SHA256 (bacula-docs-1.38.5.tar.gz) = f83e60a33ac73eb35fce30ce5a1beecd596024068386a91662b43468bb42b853
-SIZE (bacula-docs-1.38.5.tar.gz) = 23183760
+MD5 (bacula-1.38.6.tar.gz) = 219382ae85671c8ff13f375b6d9aa079
+SHA256 (bacula-1.38.6.tar.gz) = e671f3ff20c97e8392908920ae9ca38f814359c5b85b89625d43df9ad7349ed3
+SIZE (bacula-1.38.6.tar.gz) = 1952827
Index: bacula-server/pkg-install
===================================================================
RCS file: /home/pcvs/ports/sysutils/bacula-server/pkg-install,v
retrieving revision 1.2
diff -u -r1.2 pkg-install
--- bacula-server/pkg-install	12 Jan 2004 19:56:23 -0000	1.2
+++ bacula-server/pkg-install	30 Mar 2006 18:24:39 -0000
@@ -16,13 +16,17 @@
 fi
 
 case $2 in
-POST-INSTALL)
+PRE-INSTALL)
 	# Install UID/GID
 	USER=bacula
 	GROUP=${USER}
 	UID=910
 	GID=${UID}
 
+	if [ ! -d ${BACULA_DIR} ]; then
+		mkdir -p ${BACULA_DIR}
+	fi
+
 	if pw group show "${GROUP}" 2>/dev/null; then
 		echo "You already have a group \"${GROUP}\", so I will use it."
 	else
Index: bacula-server/pkg-plist
===================================================================
RCS file: /home/pcvs/ports/sysutils/bacula-server/pkg-plist,v
retrieving revision 1.17
diff -u -r1.17 pkg-plist
--- bacula-server/pkg-plist	13 Nov 2005 17:29:02 -0000	1.17
+++ bacula-server/pkg-plist	30 Mar 2006 18:24:39 -0000
@@ -1,5 +1,4 @@
 %%DATADIR%%/query.sql
-etc/rc.d/z-bacula.sh.sample
 sbin/chio-bacula
 sbin/bacula-dir
 sbin/bacula-sd
@@ -13,6 +12,7 @@
 sbin/dbcheck
 sbin/bsmtp
 @unexec if cmp -s %D/share/bacula/mtx-changer.old %D/share/bacula/mtx-changer; then rm -f %D/share/bacula/mtx-changer.old; fi
+@unexec if cmp -s %D/share/bacula/disk-changer.old %D/share/bacula/disk-changer; then rm -f %D/share/bacula/disk-changer.old; fi
 %%DATADIR%%/mtx-changer
 %%DATADIR%%/create_bacula_database
 %%DATADIR%%/create_%%DBTYPE%%_database
@@ -29,8 +29,10 @@
 %%DATADIR%%/delete_catalog_backup
 %%DATADIR%%/make_catalog_backup
 %%DATADIR%%/dvd-handler
+%%DATADIR%%/disk-changer
 
 @dirrm %%DATADIR%%
-@unexec /usr/bin/killall badula-sd > /dev/null 2>&1 || true
+@unexec /usr/bin/killall bacula-sd  > /dev/null 2>&1 || true
 @unexec /usr/bin/killall bacula-dir > /dev/null 2>&1 || true
 @exec mkdir -p %%BACULA_DIR%%
+@dirrmtry %%BACULA_DIR%%
Index: bacula-server/pkg-plist.client
===================================================================
RCS file: /home/pcvs/ports/sysutils/bacula-server/pkg-plist.client,v
retrieving revision 1.2
diff -u -r1.2 pkg-plist.client
--- bacula-server/pkg-plist.client	15 May 2005 14:44:50 -0000	1.2
+++ bacula-server/pkg-plist.client	30 Mar 2006 18:24:39 -0000
@@ -1,7 +1,7 @@
-etc/rc.d/z-bacula.sh.sample
 sbin/bacula-fd
 sbin/bconsole
 %%GNOMECONS%%sbin/gnome-console
 %%WXCONS%%sbin/wx-console
 @unexec /usr/bin/killall badula-fd > /dev/null 2>&1 || true
 @exec mkdir -p %%BACULA_DIR%%
+@dirrmtry %%BACULA_DIR%%
Index: bacula-server/files/patch-scripts-Makefile.in
===================================================================
RCS file: /home/pcvs/ports/sysutils/bacula-server/files/patch-scripts-Makefile.in,v
retrieving revision 1.9
diff -u -r1.9 patch-scripts-Makefile.in
--- bacula-server/files/patch-scripts-Makefile.in	17 Nov 2005 07:44:04 -0000	1.9
+++ bacula-server/files/patch-scripts-Makefile.in	30 Mar 2006 18:24:39 -0000
@@ -1,52 +1,33 @@
-*** scripts/Makefile.in.orig	Thu Nov  3 15:33:16 2005
---- scripts/Makefile.in	Thu Nov 17 08:31:29 2005
-***************
-*** 33,43 ****
-  	$(MKDIR) $(DESTDIR)$(mandir)
-  
-  install: installdirs
-! 	$(INSTALL_SCRIPT) startmysql $(DESTDIR)$(scriptdir)/startmysql
-! 	$(INSTALL_SCRIPT) stopmysql $(DESTDIR)$(scriptdir)/stopmysql
-! 	$(INSTALL_SCRIPT) bconsole $(DESTDIR)$(scriptdir)/bconsole
-! 	$(INSTALL_SCRIPT) gconsole $(DESTDIR)$(scriptdir)/gconsole
-! 	$(INSTALL_SCRIPT) bacula $(DESTDIR)$(scriptdir)/bacula
-  	@if  test -f ${DESTDIR}${scriptdir}/mtx-changer; then \
-  	   echo "  ==> Saving existing mtx-changer to mtx-changer.old"; \
-  	   $(MV) -f ${DESTDIR}${scriptdir}/mtx-changer ${DESTDIR}${scriptdir}/mtx-changer.old; \
---- 33,43 ----
-  	$(MKDIR) $(DESTDIR)$(mandir)
-  
-  install: installdirs
-! #	$(INSTALL_SCRIPT) startmysql $(DESTDIR)$(scriptdir)/startmysql
-! #	$(INSTALL_SCRIPT) stopmysql $(DESTDIR)$(scriptdir)/stopmysql
-! #	$(INSTALL_SCRIPT) bconsole $(DESTDIR)$(scriptdir)/bconsole
-! #	$(INSTALL_SCRIPT) gconsole $(DESTDIR)$(scriptdir)/gconsole
-! 	$(INSTALL_SCRIPT) bacula $(DESTDIR)$(sysconfdir)/rc.d/z-bacula.sh.sample
-  	@if  test -f ${DESTDIR}${scriptdir}/mtx-changer; then \
-  	   echo "  ==> Saving existing mtx-changer to mtx-changer.old"; \
-  	   $(MV) -f ${DESTDIR}${scriptdir}/mtx-changer ${DESTDIR}${scriptdir}/mtx-changer.old; \
-***************
-*** 48,58 ****
-  	   $(MV) -f ${DESTDIR}${scriptdir}/dvd-handler ${DESTDIR}${scriptdir}/dvd-handler.old; \
-  	fi
-  	$(INSTALL_SCRIPT) dvd-handler $(DESTDIR)$(scriptdir)/dvd-handler
-! 	$(INSTALL_DATA)   btraceback.gdb $(DESTDIR)$(scriptdir)/btraceback.gdb
-! 	$(INSTALL_DATA)   btraceback.dbx $(DESTDIR)$(scriptdir)/btraceback.dbx
-! 	$(INSTALL_SCRIPT) btraceback $(DESTDIR)$(sbindir)/btraceback
-! 	gzip <bacula.man >bacula.8.gz
-! 	$(INSTALL_DATA)   bacula.8.gz $(DESTDIR)$(mandir)/bacula.8.gz
-  	@rm -f bacula.8.gz
-  
-  
---- 48,58 ----
-  	   $(MV) -f ${DESTDIR}${scriptdir}/dvd-handler ${DESTDIR}${scriptdir}/dvd-handler.old; \
-  	fi
-  	$(INSTALL_SCRIPT) dvd-handler $(DESTDIR)$(scriptdir)/dvd-handler
-! #	$(INSTALL_DATA)   btraceback.gdb $(DESTDIR)$(scriptdir)/btraceback.gdb
-! #	$(INSTALL_DATA)   btraceback.dbx $(DESTDIR)$(scriptdir)/btraceback.dbx
-! #	$(INSTALL_SCRIPT) btraceback $(DESTDIR)$(sbindir)/btraceback
-! #	gzip <bacula.man >bacula.8.gz
-! 	$(INSTALL_DATA)   bacula.man $(DESTDIR)$(mandir)/bacula.8
-  	@rm -f bacula.8.gz
-  
-  
+--- scripts/Makefile.in.orig	Sat Mar 25 10:37:41 2006
++++ scripts/Makefile.in	Thu Mar 30 13:01:21 2006
+@@ -33,14 +33,6 @@
+ 	$(MKDIR) $(DESTDIR)$(mandir)
+ 
+ install: installdirs
+-	$(INSTALL_SCRIPT) startmysql $(DESTDIR)$(scriptdir)/startmysql
+-	$(INSTALL_SCRIPT) stopmysql $(DESTDIR)$(scriptdir)/stopmysql
+-	$(INSTALL_SCRIPT) bconsole $(DESTDIR)$(scriptdir)/bconsole
+-	$(INSTALL_SCRIPT) gconsole $(DESTDIR)$(scriptdir)/gconsole
+-	$(INSTALL_SCRIPT) bacula $(DESTDIR)$(scriptdir)/bacula
+-	$(INSTALL_SCRIPT) bacula-ctl-dir $(DESTDIR)$(scriptdir)/bacula-ctl-dir
+-	$(INSTALL_SCRIPT) bacula-ctl-fd $(DESTDIR)$(scriptdir)/bacula-ctl-fd
+-	$(INSTALL_SCRIPT) bacula-ctl-sd $(DESTDIR)$(scriptdir)/bacula-ctl-sd
+ 	@if  test -f ${DESTDIR}${scriptdir}/mtx-changer; then \
+ 	   echo "  ==> Saving existing mtx-changer to mtx-changer.old"; \
+ 	   $(MV) -f ${DESTDIR}${scriptdir}/mtx-changer ${DESTDIR}${scriptdir}/mtx-changer.old; \
+@@ -56,14 +48,7 @@
+ 	   $(MV) -f ${DESTDIR}${scriptdir}/dvd-handler ${DESTDIR}${scriptdir}/dvd-handler.old; \
+ 	fi
+ 	$(INSTALL_SCRIPT) dvd-handler $(DESTDIR)$(scriptdir)/dvd-handler
+-	$(INSTALL_DATA)   btraceback.gdb $(DESTDIR)$(scriptdir)/btraceback.gdb
+-	$(INSTALL_DATA)   btraceback.dbx $(DESTDIR)$(scriptdir)/btraceback.dbx
+-	chmod 0644 $(DESTDIR)$(scriptdir)/btraceback.gdb \
+-		   $(DESTDIR)$(scriptdir)/btraceback.dbx
+-	$(INSTALL_SCRIPT) btraceback $(DESTDIR)$(sbindir)/btraceback
+-	gzip <bacula.man >bacula.8.gz
+-	$(INSTALL_DATA)   bacula.8.gz $(DESTDIR)$(mandir)/bacula.8.gz
+-	@rm -f bacula.8.gz
++	$(INSTALL_DATA)   bacula.man $(DESTDIR)$(mandir)/bacula.8
+ 
+ 
+ uninstall:
Index: bacula-server/files/z-bacula-dir.sh.in
===================================================================
RCS file: bacula-server/files/z-bacula-dir.sh.in
diff -N bacula-server/files/z-bacula-dir.sh.in
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ bacula-server/files/z-bacula-dir.sh.in	30 Mar 2006 18:24:39 -0000
@@ -0,0 +1,30 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+# PROVIDE: utility
+# REQUIRE: DAEMON
+# KEYWORD: shutdown
+#
+# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
+# to enable this service:
+#
+# bacula_dir_enable  (bool):   Set to NO by default.
+#                Set it to YES to enable bacula_dir.
+# bacula_dir_flags (params):   Set params used to start bacula_dir.
+#
+
+. %%RC_SUBR%%
+
+name="bacula_dir"
+rcvar=${name}_enable
+command=%%PREFIX%%/sbin/bacula-dir
+pidfile="${bacula_dir_pidfile}"
+
+load_rc_config $name
+
+: ${bacula_dir_enable="NO"}
+: ${bacula_dir_flags=" -u bacula -g bacula -v -c %%PREFIX%%/etc/bacula-dir.conf"}
+: ${bacula_dir_pidfile="/var/run/bacula-dir.9101.pid"}
+
+run_rc_command "$1"
Index: bacula-server/files/z-bacula-fd.sh.in
===================================================================
RCS file: bacula-server/files/z-bacula-fd.sh.in
diff -N bacula-server/files/z-bacula-fd.sh.in
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ bacula-server/files/z-bacula-fd.sh.in	30 Mar 2006 18:24:39 -0000
@@ -0,0 +1,30 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+# PROVIDE: utility
+# REQUIRE: DAEMON
+# KEYWORD: shutdown
+#
+# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
+# to enable this service:
+#
+# bacula_fd_enable  (bool):  Set to NO by default.
+#               Set it to YES to enable bacula_fd.
+# bacula_fd_flags (params):  Set params used to start bacula_fd.
+#
+
+. %%RC_SUBR%%
+
+name="bacula_fd"
+rcvar=${name}_enable
+command=/usr/local/sbin/bacula-fd
+pidfile="${bacula_fd_pidfile}"
+
+load_rc_config $name
+
+: ${bacula_fd_enable="NO"}
+: ${bacula_fd_flags=" -u root -g wheel -v -c /usr/local/etc/bacula-fd.conf"}
+: ${bacula_fd_pidfile="/var/run/bacula-fd.9102.pid"}
+
+run_rc_command "$1"
Index: bacula-server/files/z-bacula-sd.sh.in
===================================================================
RCS file: bacula-server/files/z-bacula-sd.sh.in
diff -N bacula-server/files/z-bacula-sd.sh.in
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ bacula-server/files/z-bacula-sd.sh.in	30 Mar 2006 18:24:39 -0000
@@ -0,0 +1,30 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+# PROVIDE: utility
+# REQUIRE: DAEMON
+# KEYWORD: shutdown
+#
+# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
+# to enable this service:
+#
+# bacula_sd_enable  (bool):  Set to NO by default.
+#               Set it to YES to enable bacula_sd.
+# bacula_sd_flags (params):  Set params used to start bacula_sd.
+#
+
+. %%RC_SUBR%%
+
+name="bacula_sd"
+rcvar=`set_rcvar`
+command=/usr/local/sbin/bacula-sd
+pidfile="${bacula_sd_pidfile}"
+
+load_rc_config $name
+
+: ${bacula_sd_enable="NO"}
+: ${bacula_sd_flags=" -u bacula -g bacula -v -c /usr/local/etc/bacula-sd.conf"}
+: ${bacula_sd_pidfile="/var/run/bacula-sd.9103.pid"}
+
+run_rc_command "$1"
------------------- bacula.diff ends here ------------------------
-- 
Renato Botelho <garga @ FreeBSD.org>
               <freebsd @ galle.com.br>
GnuPG Key: http://www.FreeBSD.org/~garga/pubkey.asc

It seems intuitively obvious to me, which means that it might be wrong.
		-- Chris Torek
Comment 7 Renato Botelho freebsd_committer freebsd_triage 2006-03-31 11:13:53 UTC
State Changed
From-To: feedback->closed

Committed. Thanks!