From dd06150de32dc622351275972ac4aea29f8ca71b Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Thu, 18 Dec 2003 12:26:27 +0000 Subject: [PATCH] Add skeleton SuSe platform files git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@887 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/autoconf/config.h.in | 5 +- bacula/autoconf/configure.in | 10 ++++ bacula/configure | 10 ++++ bacula/kernstodo | 3 +- bacula/platforms/suse/Makefile.in | 81 +++++++++++++++++++++++++++++ bacula/platforms/suse/bacula-dir.in | 44 ++++++++++++++++ bacula/platforms/suse/bacula-fd.in | 43 +++++++++++++++ bacula/platforms/suse/bacula-sd.in | 43 +++++++++++++++ 8 files changed, 237 insertions(+), 2 deletions(-) create mode 100644 bacula/platforms/suse/Makefile.in create mode 100755 bacula/platforms/suse/bacula-dir.in create mode 100755 bacula/platforms/suse/bacula-fd.in create mode 100755 bacula/platforms/suse/bacula-sd.in diff --git a/bacula/autoconf/config.h.in b/bacula/autoconf/config.h.in index d14f5cdae1..c645b3b2f8 100644 --- a/bacula/autoconf/config.h.in +++ b/bacula/autoconf/config.h.in @@ -21,6 +21,9 @@ /* Define to `int' if doesn't define. */ #undef ssize_t +/* Define if you want to use PostgreSQL */ +#undef HAVE_POSTGRESQL + /* Define if you want to use MySQL */ #undef HAVE_MYSQL @@ -121,7 +124,7 @@ /* Define to 1 if utime.h exists and declares struct utimbuf. */ #undef HAVE_UTIME_H -#if (HAVE_MYSQL||HAVE_PGSQL||HAVE_MSQL||HAVE_IODBC||HAVE_UNIXODBC||HAVE_SOLID||HAVE_VIRT||HAVE_IBASE||HAVE_ORACLE8||HAVE_ORACLE7||HAVE_EASYSOFT) +#if (HAVE_MYSQL||HAVE_POSTGRESQL||HAVE_MSQL||HAVE_IODBC||HAVE_UNIXODBC||HAVE_SOLID||HAVE_VIRT||HAVE_IBASE||HAVE_ORACLE8||HAVE_ORACLE7||HAVE_EASYSOFT) #define HAVE_SQL #endif diff --git a/bacula/autoconf/configure.in b/bacula/autoconf/configure.in index 4ccd781b3e..9b151f5107 100644 --- a/bacula/autoconf/configure.in +++ b/bacula/autoconf/configure.in @@ -1461,6 +1461,11 @@ suse) TAPEDRIVE="/dev/nst0" PSCMD="ps -e -o pid,command" hostname=`hostname -s` + PFILES="${PFILES} \ + platforms/suse/Makefile \ + platforms/suse/bacula-fd \ + platforms/suse/bacula-sd \ + platforms/suse/bacula-dir" ;; suse5) DISTNAME=suse @@ -1468,6 +1473,11 @@ suse5) TAPEDRIVE="/dev/nst0" PSCMD="ps -e -o pid,command" hostname=`hostname -s` + PFILES="${PFILES} \ + platforms/suse/Makefile \ + platforms/suse/bacula-fd \ + platforms/suse/bacula-sd \ + platforms/suse/bacula-dir" ;; unknown) DISTVER=unknown diff --git a/bacula/configure b/bacula/configure index 4efdf24bc4..8710d861cb 100755 --- a/bacula/configure +++ b/bacula/configure @@ -17761,6 +17761,11 @@ suse) TAPEDRIVE="/dev/nst0" PSCMD="ps -e -o pid,command" hostname=`hostname -s` + PFILES="${PFILES} \ + platforms/suse/Makefile \ + platforms/suse/bacula-fd \ + platforms/suse/bacula-sd \ + platforms/suse/bacula-dir" ;; suse5) DISTNAME=suse @@ -17768,6 +17773,11 @@ suse5) TAPEDRIVE="/dev/nst0" PSCMD="ps -e -o pid,command" hostname=`hostname -s` + PFILES="${PFILES} \ + platforms/suse/Makefile \ + platforms/suse/bacula-fd \ + platforms/suse/bacula-sd \ + platforms/suse/bacula-dir" ;; unknown) DISTVER=unknown diff --git a/bacula/kernstodo b/bacula/kernstodo index 196bc74033..640cd15663 100644 --- a/bacula/kernstodo +++ b/bacula/kernstodo @@ -1,5 +1,5 @@ Kern's ToDo List - 17 December 2003 + 18 December 2003 Documentation to do: (any release a little bit at a time) - Document running a test version. @@ -55,6 +55,7 @@ For 1.33 Testing/Documentation: - Add subsections to the Disaster Recovery index section. For 1.33 +- In restore take all filesets with same base name. - From Alan Brown BTW, there's a make install bug in 1.33 - with --enable-gnome, gnome-console is built, but the binary and .conf are not being installed. diff --git a/bacula/platforms/suse/Makefile.in b/bacula/platforms/suse/Makefile.in new file mode 100644 index 0000000000..a2dcad99d1 --- /dev/null +++ b/bacula/platforms/suse/Makefile.in @@ -0,0 +1,81 @@ +# +# This file is used as the template to create the +# Makefile for the SuSe specific installation. +# +# +# for Bacula release @VERSION@ (@DATE@) -- @DISTNAME@ +# + +INSTALL = @INSTALL@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ + +nothing: + +install: install-autostart + +install-autostart: install-autostart-fd install-autostart-sd install-autostart-dir + + +install-autostart-fd: + @if test x$(DESTDIR) = x -a -f /etc/rc.d/init.d/bacula-fd; then \ + /sbin/chkconfig --del bacula-fd; \ + fi + @$(INSTALL_PROGRAM) -m 744 bacula-fd $(DESTDIR)/etc/rc.d/init.d/bacula-fd + # set symlinks for script at startup and shutdown + @if test x$(DESTDIR) = x ; then \ + /sbin/chkconfig --add bacula-fd; \ + fi + + +install-autostart-sd: + @if test x$(DESTDIR) = x -a -f /etc/rc.d/init.d/bacula-sd; then \ + /sbin/chkconfig --del bacula-sd; \ + fi + @$(INSTALL_PROGRAM) -m 744 bacula-sd $(DESTDIR)/etc/rc.d/init.d/bacula-sd + # set symlinks for script at startup and shutdown + @if test x$(DESTDIR) = x ; then \ + /sbin/chkconfig --add bacula-sd; \ + fi + + +install-autostart-dir: + @if test x$(DESTDIR) = x -a -f /etc/rc.d/init.d/bacula-dir; then \ + /sbin/chkconfig --del bacula-dir; \ + fi + @$(INSTALL_PROGRAM) -m 744 bacula-dir $(DESTDIR)/etc/rc.d/init.d/bacula-dir + # set symlinks for script at startup and shutdown + @if test x$(DESTDIR) = x ; then \ + /sbin/chkconfig --add bacula-dir; \ + fi + + +uninstall: uninstall-autostart + +uninstall-autostart: uninstall-autostart-fd uninstall-autostart-sd uninstall-autostart-dir + +uninstall-autostart-fd: + @if test x$(DESTDIR) = x -a -f /etc/rc.d/init.d/bacula-fd; then \ + /sbin/chkconfig --del bacula-fd; \ + fi + @rm -f $(DESTDIR)/etc/rc.d/init.d/bacula-fd + + +uninstall-autostart-sd: + @if test x$(DESTDIR) = x -a -f /etc/rc.d/init.d/bacula-sd; then \ + /sbin/chkconfig --del bacula-sd; \ + fi + @rm -f $(DESTDIR)/etc/rc.d/init.d/bacula-sd + +uninstall-autostart-dir: + @if test x$(DESTDIR) = x -a -f /etc/rc.d/init.d/bacula-dir; then \ + /sbin/chkconfig --del bacula-dir; \ + fi + @rm -f $(DESTDIR)/etc/rc.d/init.d/bacula-dir + +clean: + @rm -f 1 2 3 + +distclean: clean + @rm -f Makefile bacula-*.spec bacula.*.spec bacula.spec + @rm -f bacula-sd bacula-fd bacula-dir + @rm -rf CVS diff --git a/bacula/platforms/suse/bacula-dir.in b/bacula/platforms/suse/bacula-dir.in new file mode 100755 index 0000000000..05fec1b712 --- /dev/null +++ b/bacula/platforms/suse/bacula-dir.in @@ -0,0 +1,44 @@ +#! /bin/sh +# +# bacula This shell script takes care of starting and stopping +# the bacula Director daemon +# +# chkconfig: 2345 90 99 +# description: It comes by night and sucks the vital essence from your computers. +# +# For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@ +# + +# Source function library +. /etc/rc.d/init.d/functions + +RETVAL=0 +case "$1" in + start) + echo -n "Starting the Bacula Director: " + daemon @sbindir@/bacula-dir $2 -c @sysconfdir@/bacula-dir.conf + RETVAL=$? + echo + [ $RETVAL -eq 0 ] && touch @subsysdir@/bacula-dir + ;; + stop) + echo -n "Stopping the Director daemon: " + killproc @sbindir@/bacula-dir + RETVAL=$? + echo + [ $RETVAL -eq 0 ] && rm -f @subsysdir@/bacula-dir + ;; + restart) + $0 stop + sleep 5 + $0 start + ;; + status) + status @sbindir@/bacula-dir + ;; + *) + echo "Usage: $0 {start|stop|restart|status}" + exit 1 + ;; +esac +exit 0 diff --git a/bacula/platforms/suse/bacula-fd.in b/bacula/platforms/suse/bacula-fd.in new file mode 100755 index 0000000000..8b725bc722 --- /dev/null +++ b/bacula/platforms/suse/bacula-fd.in @@ -0,0 +1,43 @@ +#! /bin/sh +# +# bacula This shell script takes care of starting and stopping +# the bacula File daemon. +# +# chkconfig: 2345 90 99 +# description: It comes by night and sucks the vital essence from your computers. +# +# For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@ +# + +# Source function library +. /etc/rc.d/init.d/functions + +case "$1" in + start) + echo -n "Starting the Bacula File daemon: " + daemon @sbindir@/bacula-fd $2 -c @sysconfdir@/bacula-fd.conf + RETVAL=$? + echo + [ $RETVAL -eq 0 ] && touch @subsysdir@/bacula-fd + ;; + stop) + echo -n "Stopping the Bacula File daemon: " + killproc @sbindir@/bacula-fd + RETVAL=$? + echo + [ $RETVAL -eq 0 ] && rm -f @subsysdir@/bacula-fd + ;; + restart) + $0 stop + sleep 5 + $0 start + ;; + status) + status @sbindir@/bacula-fd + ;; + *) + echo "Usage: $0 {start|stop|restart|status}" + exit 1 + ;; +esac +exit 0 diff --git a/bacula/platforms/suse/bacula-sd.in b/bacula/platforms/suse/bacula-sd.in new file mode 100755 index 0000000000..e58287625d --- /dev/null +++ b/bacula/platforms/suse/bacula-sd.in @@ -0,0 +1,43 @@ +#! /bin/sh +# +# bacula This shell script takes care of starting and stopping +# the bacula Storage daemon. +# +# chkconfig: 2345 90 99 +# description: It comes by night and sucks the vital essence from your computers. +# +# For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@ +# + +# Source function library +. /etc/rc.d/init.d/functions + +case "$1" in + start) + echo -n "Starting the Bacula Storage daemon: " + daemon @sbindir@/bacula-sd $2 -c @sysconfdir@/bacula-sd.conf + RETVAL=$? + echo + [ $RETVAL -eq 0 ] && touch @subsysdir@/bacula-sd + ;; + stop) + echo -n "Stopping the Bacula Storage daemon: " + killproc @sbindir@/bacula-sd + RETVAL=$? + echo + [ $RETVAL -eq 0 ] && rm -f @subsysdir@/bacula-sd + ;; + restart) + $0 stop + sleep 5 + $0 start + ;; + status) + status @sbindir@/bacula-sd + ;; + *) + echo "Usage: $0 {start|stop|restart|status}" + exit 1 + ;; +esac +exit 0 -- 2.39.5